From: Alok Kataria <alok.kataria@calsoftinc.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <clameter@engr.sgi.com>,
akpm@osdl.org, manfred@colorfullife.com,
linux-kernel@vger.kernel.org
Subject: Re: slab: Remove SLAB_NO_REAP option
Date: Thu, 23 Feb 2006 15:05:45 +0530 (IST) [thread overview]
Message-ID: <Pine.LNX.4.63.0602231502380.7798@localhost.localdomain> (raw)
On Thu, 2006-02-23 at 14:18, Pekka Enberg wrote:
On 2/23/06, Alok Kataria <alok.kataria@calsoftinc.com> wrote:
> > There can be some caches which are not used quite often, kmem_cache
> > for instance. Now from performance perspective having SLAB_NO_REAP for
> > such caches is good.
>
> Yeah, kmem_cache sounds like a realistic user, but I am wondering if
> it makes any sense for anyone else to use it?
>
Right, thats why my question still is why do these iscsi & ocfs cache
have this flag set.
If we are sure that the flag is still required, we can use the patch
below.
> If you're not using a
> cache that often, perhaps we're better off using kmalloc() instead?
>
Right.
Thanks & Regards,
Alok
--
As pointed by Christoph, there is a problem with SLAB_NO_REAP flag. If set
then the recovery of objects from alien caches is switched off.
Objects not freed on the same node where they were initially
allocated will only be reused if a certain amount of objects
accumulates from one alien node (not very likely) or if the cache is
explicitly shrunk.
This patch facilitates draining of the alien caches irrespective of the value
of SLAB_NO_REAP flag.
Signed-off-by: Alok N Kataria <alok.kataria@calsoftinc.com>
Index: linux-2.6.16-rc4-git5/mm/slab.c
===================================================================
--- linux-2.6.16-rc4-git5.orig/mm/slab.c 2006-02-23 01:09:49.000000000 -0800
+++ linux-2.6.16-rc4-git5/mm/slab.c 2006-02-23 01:12:54.000000000 -0800
@@ -3488,14 +3488,15 @@ static void cache_reap(void *unused)
searchp = list_entry(walk, struct kmem_cache, next);
- if (searchp->flags & SLAB_NO_REAP)
- goto next;
-
check_irq_on();
l3 = searchp->nodelists[numa_node_id()];
if (l3->alien)
drain_alien_cache(searchp, l3->alien);
+
+ if (searchp->flags & SLAB_NO_REAP)
+ goto next;
+
spin_lock_irq(&l3->list_lock);
drain_array_locked(searchp, cpu_cache_get(searchp), 0,
next reply other threads:[~2006-02-23 9:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-23 9:35 Alok Kataria [this message]
2006-02-23 10:09 ` Andrew Morton
2006-02-23 11:34 ` Pekka J Enberg
2006-02-23 17:20 ` Christoph Lameter
2006-02-23 18:36 ` Pekka Enberg
2006-02-23 18:47 ` Christoph Lameter
2006-02-23 19:17 ` Ravikiran G Thirumalai
2006-02-23 19:24 ` Christoph Lameter
2006-02-24 7:36 ` Pekka Enberg
2006-02-24 16:19 ` Christoph Lameter
2006-02-25 22:15 ` Pekka Enberg
2006-02-23 17:17 ` Christoph Lameter
-- strict thread matches above, loose matches on Subject: below --
2006-02-22 22:34 Christoph Lameter
2006-02-23 7:46 ` Pekka Enberg
2006-02-23 7:54 ` Alok Kataria
2006-02-23 8:48 ` Pekka Enberg
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.63.0602231502380.7798@localhost.localdomain \
--to=alok.kataria@calsoftinc.com \
--cc=akpm@osdl.org \
--cc=clameter@engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=penberg@cs.helsinki.fi \
/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
all inboxes | Powered by JetHome®