linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Ed Tomlinson <tomlins@cam.org>
Cc: Andrew Morton <akpm@digeo.com>,
	John Levon <movement@marcelothewonderpenguin.com>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.5.39 kmem_cache bug
Date: Sun, 29 Sep 2002 15:52:04 +0200	[thread overview]
Message-ID: <3D970584.5040606@colorfullife.com> (raw)
In-Reply-To: 200209290915.52661.tomlins@cam.org

Ed Tomlinson wrote:
>  
> -	if (__kmem_cache_shrink(cachep)) {
> +	/* remove any empty partial pages */
> +	spin_lock_irq(&cachep->spinlock);
> +	while (!cachep->growing) {
> +		struct list_head *p;
> +		slab_t *slabp;
> +

growing is guaranteed to be false - loop is not necessary.

Actually growing can be removed completely, it's never necessary, 
neither with nor without kmem_cache_reap().

Ed, there are far more cleanups possible in slab.c than just going from 
3 to 2 lists, but IMHO it's far to early to make the design decision for 
2 lists.

Or wait: You want 2 lists? Ok, agreed.

free and partial ;-)

The full list is unnecessary, it's possible to replace it with a 
counter. It also saves several cacheline accesses for the list_del() and 
list_add() into the full list...

--
	Manfred


  reply	other threads:[~2002-09-29 13:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-28 20:13 2.5.39 kmem_cache bug John Levon
2002-09-28 20:56 ` Andrew Morton
2002-09-28 21:12   ` Manfred Spraul
2002-09-28 21:23   ` John Levon
2002-09-28 21:35     ` Andrew Morton
2002-09-29 11:45   ` Ed Tomlinson
2002-09-29 12:13     ` Manfred Spraul
2002-09-29 13:15   ` Ed Tomlinson
2002-09-29 13:52     ` Manfred Spraul [this message]
2002-09-29 13:53     ` John Levon

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=3D970584.5040606@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=movement@marcelothewonderpenguin.com \
    --cc=tomlins@cam.org \
    /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).