linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: JoonSoo Kim <js1304@gmail.com>
To: Christoph Lameter <cl@linux.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: Thu, 16 Aug 2012 01:35:41 +0900	[thread overview]
Message-ID: <CAAmzW4M9WMnxVKpR00SqufHadY-=i0Jgf8Ktydrw5YXK8VwJ7A@mail.gmail.com> (raw)
In-Reply-To: <000001392af5ab4e-41dbbbe4-5808-484b-900a-6f4eba102376-000000@email.amazonses.com>

2012/8/16 Christoph Lameter <cl@linux.com>:
> On Thu, 16 Aug 2012, Joonsoo Kim wrote:
>
>> s->cpu_partial determine the maximum number of objects kept
>> in the per cpu partial lists of a processor. Currently, it is used for
>> not only per cpu partial list but also cpu freelist. Therefore
>> get_partial_node() doesn't work properly according to our first intention.
>
> The "cpu freelist" in slub is the number of free objects in a specific
> page. There is nothing that s->cpu_partial can do about that.
>
> Maybe I do not understand you correctly. Could you explain this in some
> more detail?

I assume that cpu slab and cpu partial slab are not same thing.

In my definition,
cpu slab is in c->page,
cpu partial slab is in c->partial

When we have no free objects in cpu slab and cpu partial slab, we try
to get slab via get_partial_node().
In that function, we call acquire_slab(). Then we hit "!object" case
(for cpu slab).
In that case, we test available with s->cpu_partial.

I think that s->cpu_partial is for cpu partial slab, not cpu slab.
So this test is not proper.
This patch is for correcting this.

Thanks!

  reply	other threads:[~2012-08-15 16:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 15:38 [PATCH] slub: try to get cpu partial slab even if we get enough objects for cpu freelist Joonsoo Kim
2012-08-15 15:45 ` Christoph Lameter
2012-08-15 16:35   ` JoonSoo Kim [this message]
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

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='CAAmzW4M9WMnxVKpR00SqufHadY-=i0Jgf8Ktydrw5YXK8VwJ7A@mail.gmail.com' \
    --to=js1304@gmail.com \
    --cc=cl@linux.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;
as well as URLs for NNTP newsgroup(s).