Messages in this thread | | | Date | Fri, 17 Aug 2012 14:56:16 +0000 | From | Christoph Lameter <> | Subject | Re: [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 ...
| |