aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 4fff385b17a3..a3e2d552ff46 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3838,6 +3838,26 @@ static ssize_t order_show(struct kmem_cache *s, char *buf)
3838} 3838}
3839SLAB_ATTR(order); 3839SLAB_ATTR(order);
3840 3840
3841static ssize_t min_partial_show(struct kmem_cache *s, char *buf)
3842{
3843 return sprintf(buf, "%lu\n", s->min_partial);
3844}
3845
3846static ssize_t min_partial_store(struct kmem_cache *s, const char *buf,
3847 size_t length)
3848{
3849 unsigned long min;
3850 int err;
3851
3852 err = strict_strtoul(buf, 10, &min);
3853 if (err)
3854 return err;
3855
3856 calculate_min_partial(s, min);
3857 return length;
3858}
3859SLAB_ATTR(min_partial);
3860
3841static ssize_t ctor_show(struct kmem_cache *s, char *buf) 3861static ssize_t ctor_show(struct kmem_cache *s, char *buf)
3842{ 3862{
3843 if (s->ctor) { 3863 if (s->ctor) {
@@ -4153,6 +4173,7 @@ static struct attribute *slab_attrs[] = {
4153 &object_size_attr.attr, 4173 &object_size_attr.attr,
4154 &objs_per_slab_attr.attr, 4174 &objs_per_slab_attr.attr,
4155 &order_attr.attr, 4175 &order_attr.attr,
4176 &min_partial_attr.attr,
4156 &objects_attr.attr, 4177 &objects_attr.attr,
4157 &objects_partial_attr.attr, 4178 &objects_partial_attr.attr,
4158 &total_objects_attr.attr, 4179 &total_objects_attr.attr,