• Home
  • Raw
  • Download

Lines Matching refs:buf

893 	char buf[100];  in slab_err()  local
899 vsnprintf(buf, sizeof(buf), fmt, args); in slab_err()
901 slab_bug(s, "%s", buf); in slab_err()
5248 char *buf, unsigned long flags) in show_slab_objects() argument
5344 len += sysfs_emit_at(buf, len, "%lu", total); in show_slab_objects()
5348 len += sysfs_emit_at(buf, len, " N%d=%lu", in show_slab_objects()
5352 len += sysfs_emit_at(buf, len, "\n"); in show_slab_objects()
5363 ssize_t (*show)(struct kmem_cache *s, char *buf);
5375 static ssize_t slab_size_show(struct kmem_cache *s, char *buf) in slab_size_show() argument
5377 return sysfs_emit(buf, "%u\n", s->size); in slab_size_show()
5381 static ssize_t align_show(struct kmem_cache *s, char *buf) in align_show() argument
5383 return sysfs_emit(buf, "%u\n", s->align); in align_show()
5387 static ssize_t object_size_show(struct kmem_cache *s, char *buf) in object_size_show() argument
5389 return sysfs_emit(buf, "%u\n", s->object_size); in object_size_show()
5393 static ssize_t objs_per_slab_show(struct kmem_cache *s, char *buf) in objs_per_slab_show() argument
5395 return sysfs_emit(buf, "%u\n", oo_objects(s->oo)); in objs_per_slab_show()
5399 static ssize_t order_show(struct kmem_cache *s, char *buf) in order_show() argument
5401 return sysfs_emit(buf, "%u\n", oo_order(s->oo)); in order_show()
5405 static ssize_t min_partial_show(struct kmem_cache *s, char *buf) in min_partial_show() argument
5407 return sysfs_emit(buf, "%lu\n", s->min_partial); in min_partial_show()
5410 static ssize_t min_partial_store(struct kmem_cache *s, const char *buf, in min_partial_store() argument
5416 err = kstrtoul(buf, 10, &min); in min_partial_store()
5425 static ssize_t cpu_partial_show(struct kmem_cache *s, char *buf) in cpu_partial_show() argument
5427 return sysfs_emit(buf, "%u\n", slub_cpu_partial(s)); in cpu_partial_show()
5430 static ssize_t cpu_partial_store(struct kmem_cache *s, const char *buf, in cpu_partial_store() argument
5436 err = kstrtouint(buf, 10, &objects); in cpu_partial_store()
5448 static ssize_t ctor_show(struct kmem_cache *s, char *buf) in ctor_show() argument
5452 return sysfs_emit(buf, "%pS\n", s->ctor); in ctor_show()
5456 static ssize_t aliases_show(struct kmem_cache *s, char *buf) in aliases_show() argument
5458 return sysfs_emit(buf, "%d\n", s->refcount < 0 ? 0 : s->refcount - 1); in aliases_show()
5462 static ssize_t partial_show(struct kmem_cache *s, char *buf) in partial_show() argument
5464 return show_slab_objects(s, buf, SO_PARTIAL); in partial_show()
5468 static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf) in cpu_slabs_show() argument
5470 return show_slab_objects(s, buf, SO_CPU); in cpu_slabs_show()
5474 static ssize_t objects_show(struct kmem_cache *s, char *buf) in objects_show() argument
5476 return show_slab_objects(s, buf, SO_ALL|SO_OBJECTS); in objects_show()
5480 static ssize_t objects_partial_show(struct kmem_cache *s, char *buf) in objects_partial_show() argument
5482 return show_slab_objects(s, buf, SO_PARTIAL|SO_OBJECTS); in objects_partial_show()
5486 static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf) in slabs_cpu_partial_show() argument
5504 len += sysfs_emit_at(buf, len, "%d(%d)", objects, pages); in slabs_cpu_partial_show()
5512 len += sysfs_emit_at(buf, len, " C%d=%d(%d)", in slabs_cpu_partial_show()
5516 len += sysfs_emit_at(buf, len, "\n"); in slabs_cpu_partial_show()
5522 static ssize_t reclaim_account_show(struct kmem_cache *s, char *buf) in reclaim_account_show() argument
5524 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_RECLAIM_ACCOUNT)); in reclaim_account_show()
5528 static ssize_t hwcache_align_show(struct kmem_cache *s, char *buf) in hwcache_align_show() argument
5530 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_HWCACHE_ALIGN)); in hwcache_align_show()
5535 static ssize_t cache_dma_show(struct kmem_cache *s, char *buf) in cache_dma_show() argument
5537 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_CACHE_DMA)); in cache_dma_show()
5542 static ssize_t usersize_show(struct kmem_cache *s, char *buf) in usersize_show() argument
5544 return sysfs_emit(buf, "%u\n", s->usersize); in usersize_show()
5548 static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf) in destroy_by_rcu_show() argument
5550 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_TYPESAFE_BY_RCU)); in destroy_by_rcu_show()
5555 static ssize_t slabs_show(struct kmem_cache *s, char *buf) in slabs_show() argument
5557 return show_slab_objects(s, buf, SO_ALL); in slabs_show()
5561 static ssize_t total_objects_show(struct kmem_cache *s, char *buf) in total_objects_show() argument
5563 return show_slab_objects(s, buf, SO_ALL|SO_TOTAL); in total_objects_show()
5567 static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf) in sanity_checks_show() argument
5569 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_CONSISTENCY_CHECKS)); in sanity_checks_show()
5573 static ssize_t trace_show(struct kmem_cache *s, char *buf) in trace_show() argument
5575 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_TRACE)); in trace_show()
5579 static ssize_t red_zone_show(struct kmem_cache *s, char *buf) in red_zone_show() argument
5581 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_RED_ZONE)); in red_zone_show()
5586 static ssize_t poison_show(struct kmem_cache *s, char *buf) in poison_show() argument
5588 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_POISON)); in poison_show()
5593 static ssize_t store_user_show(struct kmem_cache *s, char *buf) in store_user_show() argument
5595 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_STORE_USER)); in store_user_show()
5600 static ssize_t validate_show(struct kmem_cache *s, char *buf) in validate_show() argument
5606 const char *buf, size_t length) in validate_store() argument
5610 if (buf[0] == '1') { in validate_store()
5622 static ssize_t failslab_show(struct kmem_cache *s, char *buf) in failslab_show() argument
5624 return sysfs_emit(buf, "%d\n", !!(s->flags & SLAB_FAILSLAB)); in failslab_show()
5629 static ssize_t shrink_show(struct kmem_cache *s, char *buf) in shrink_show() argument
5635 const char *buf, size_t length) in shrink_store() argument
5637 if (buf[0] == '1') in shrink_store()
5646 static ssize_t remote_node_defrag_ratio_show(struct kmem_cache *s, char *buf) in remote_node_defrag_ratio_show() argument
5648 return sysfs_emit(buf, "%u\n", s->remote_node_defrag_ratio / 10); in remote_node_defrag_ratio_show()
5652 const char *buf, size_t length) in remote_node_defrag_ratio_store() argument
5657 err = kstrtouint(buf, 10, &ratio); in remote_node_defrag_ratio_store()
5671 static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si) in show_stat() argument
5688 len += sysfs_emit_at(buf, len, "%lu", sum); in show_stat()
5693 len += sysfs_emit_at(buf, len, " C%d=%u", in show_stat()
5698 len += sysfs_emit_at(buf, len, "\n"); in show_stat()
5712 static ssize_t text##_show(struct kmem_cache *s, char *buf) \
5714 return show_stat(s, buf, si); \
5717 const char *buf, size_t length) \
5719 if (buf[0] != '0') \
5831 char *buf) in slab_attr_show() argument
5843 err = attribute->show(s, buf); in slab_attr_show()
5850 const char *buf, size_t len) in slab_attr_store() argument
5862 err = attribute->store(s, buf, len); in slab_attr_store()