Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135874
b: refs/heads/master
c: 73d342b
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Pekka Enberg committed Feb 23, 2009
1 parent 5e511a9 commit d2425b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b89d7d881a1dbb4da158f7eb5d6b3ceefc72810
refs/heads/master: 73d342b169db700b5a6ad626fe4b86911efec8db
21 changes: 21 additions & 0 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3838,6 +3838,26 @@ static ssize_t order_show(struct kmem_cache *s, char *buf)
}
SLAB_ATTR(order);

static ssize_t min_partial_show(struct kmem_cache *s, char *buf)
{
return sprintf(buf, "%lu\n", s->min_partial);
}

static ssize_t min_partial_store(struct kmem_cache *s, const char *buf,
size_t length)
{
unsigned long min;
int err;

err = strict_strtoul(buf, 10, &min);
if (err)
return err;

calculate_min_partial(s, min);
return length;
}
SLAB_ATTR(min_partial);

static ssize_t ctor_show(struct kmem_cache *s, char *buf)
{
if (s->ctor) {
Expand Down Expand Up @@ -4153,6 +4173,7 @@ static struct attribute *slab_attrs[] = {
&object_size_attr.attr,
&objs_per_slab_attr.attr,
&order_attr.attr,
&min_partial_attr.attr,
&objects_attr.attr,
&objects_partial_attr.attr,
&total_objects_attr.attr,
Expand Down

0 comments on commit d2425b5

Please sign in to comment.