linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Ed Tomlinson <tomlins@cam.org>
Cc: linux-mm@kvack.org
Subject: Re: 2.5.39 kmem_cache bug
Date: Mon, 30 Sep 2002 18:33:59 +0200	[thread overview]
Message-ID: <3D987CF7.6060203@colorfullife.com> (raw)
In-Reply-To: <200209300718.57382.tomlins@cam.org>

What's the optimal number of free objects in the partial/free lists of 
an active cache?

I'd say a few times the batchcount, otherwise a cpu won't be able to 
perform a complete refill. [during refill, at most one grow happens - 
I've assumed that swallowing 30 pages with GFP_ATOMIC in an interrupt 
handler is not nice from the system perspective]

What about this logic:
- if there were no recent allocations performed by a cpu, then return 
cc->limit/5 objects from the cpu array to the node lists.

- If a slab becomes a free slab, and there are more than 
3*cc->batchcount*NR_CPUS/NR_NODES objects in the partial or free lists, 
then return the slab immediately to the gfp.

- If noone accessed the free list recently, then a few slabs are 
returned to gfp. [<worst case number of free slabs that can exist>/5]

The constants could be updated by vm pressure callbacks.

--
	Manfred

--
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/

      reply	other threads:[~2002-09-30 16:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020928201308.GA59189@compsoc.man.ac.uk>
     [not found] ` <200209291137.48483.tomlins@cam.org>
     [not found]   ` <3D972828.6010807@colorfullife.com>
2002-09-30  0:20     ` Ed Tomlinson
2002-09-30  5:55       ` Manfred Spraul
2002-09-30 11:18         ` Ed Tomlinson
2002-09-30 16:33           ` Manfred Spraul [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=3D987CF7.6060203@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=linux-mm@kvack.org \
    --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