From: Christoph Lameter <cl@linux.com>
To: JoonSoo Kim <js1304@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
David Rientjes <rientjes@google.com>
Subject: Re: [PATCH] slub: try to get cpu partial slab even if we get enough objects for cpu freelist
Date: Fri, 17 Aug 2012 14:56:16 +0000 [thread overview]
Message-ID: <000001393515ab5f-b518fa1e-a5e1-4849-b711-c2ebbdfd65a1-000000@email.amazonses.com> (raw)
In-Reply-To: <CAAmzW4PXf=GK-a8-r_Ep4vR=kx54pr9h5K00iEDx3rVii5ROiA@mail.gmail.com>
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-08-17 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 15:38 Joonsoo Kim
2012-08-15 15:45 ` Christoph Lameter
2012-08-15 16:35 ` JoonSoo Kim
2012-08-15 17:32 ` Christoph Lameter
2012-08-16 13:47 ` JoonSoo Kim
2012-08-16 17:08 ` Christoph Lameter
2012-08-17 13:34 ` JoonSoo Kim
2012-08-17 14:02 ` Christoph Lameter
2012-08-17 14:37 ` JoonSoo Kim
2012-08-17 14:56 ` Christoph Lameter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=000001393515ab5f-b518fa1e-a5e1-4849-b711-c2ebbdfd65a1-000000@email.amazonses.com \
--to=cl@linux.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox