[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <000001393515ab5f-b518fa1e-a5e1-4849-b711-c2ebbdfd65a1-000000@email.amazonses.com>
Date: Fri, 17 Aug 2012 14:56:16 +0000
From: Christoph Lameter <cl@...ux.com>
To: JoonSoo Kim <js1304@...il.com>
cc: Pekka Enberg <penberg@...nel.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, David Rientjes <rientjes@...gle.com>
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 ...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists