linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Xin Zhao <uszhaoxin@gmail.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: Linux SLAB allocator issue
Date: Wed, 7 Jun 2006 10:41:55 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0606071030040.831@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <4ae3c140606070837t23182496s42edb3a754169d43@mail.gmail.com>

On Wed, 7 Jun 2006, Xin Zhao wrote:

> Then, I used kmem_cache_alloc() to allocate 128 objects. So it should
> occupy 12 full slabs and 1 partial slab. Right?

There may be additional objects in the various caches. If this is a UP 
system then some will certainly be in the per cpu cache.

You can push these back into the free lists by draining the array cache.

If you allocate objects on a slab that is fresh (no objects in it) then 
only full slabs will be used. The remaining objects will end up on the per 
cpu lists where they can be consumed without more work on the full/partial 
arrays.


      reply	other threads:[~2006-06-07 17:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-06 20:58 Linux SLAB allocator issue Xin Zhao
2006-06-07 12:16 ` Pekka Enberg
2006-06-07 15:37   ` Xin Zhao
2006-06-07 17:41     ` 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=Pine.LNX.4.64.0606071030040.831@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=uszhaoxin@gmail.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).