lkml.org 
[lkml]   [2012]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] slub: try to get cpu partial slab even if we get enough objects for cpu freelist
On Fri, 17 Aug 2012, JoonSoo Kim wrote:

> In case of !object (available = page->objects - page->inuse;),
> "available" means the number of objects in cpu slab.

Right because we do not have allocated any cpu partial slabs yet.

> In this time, we don't have any cpu partial slab, so "available" imply
> the number of objects available to the cpu without locking.
> This is what we want.
>
>
> But, see another "available" (available = put_cpu_partial(s, page, 0);).
>
> This "available" doesn't include the number of objects in cpu slab.

Ok. Now I see.

> Therefore, I think a minor fix is needed for consistency.
> Isn't it reasonable?

Yup it is. Let me look over your patch again.

Ok so use meaningful names for the variables to clarify the issue.

cpu_objects and partial_objects or so?

Then the check would be as you proposed in the last message

if (cpu_objects + partial_objects < s->cpu_partial ...




\
 
 \ /
  Last update: 2012-08-17 17:41    [W:0.067 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site