From: Ed Tomlinson <tomlins@cam.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-mm@kvack.org
Subject: Re: 2.5.39 kmem_cache bug
Date: Mon, 30 Sep 2002 07:18:57 -0400 [thread overview]
Message-ID: <200209300718.57382.tomlins@cam.org> (raw)
In-Reply-To: <3D97E737.80405@colorfullife.com>
On September 30, 2002 01:55 am, Manfred Spraul wrote:
> Ed Tomlinson wrote:
> >>The first problem is the per-cpu array draining. It's needed, too many
> >>objects can sit in the per-cpu arrays.
> >>< 2.5.39, the per-cpu arrays can cause more list operations than no
> >>batching, this is something that must be avoided.
> >>
> >>Do you see an alternative to a timer/callback/hook? What's the simplest
> >>approach to ensure that the callback runs on all cpus? I know Redhat has
> >>a scalable timer patch, that one would fix the timer to the cpu that
> >>called add_timer.
> >
> > Maybe. If we treat the per cpu data as special form of cache we could
> > use the shrinker callbacks to track how much we have to trim. When the
> > value exceeds a threshold (set when we setup the callback) we trim. We
> > could do the test in freeing path in slab.
>
> 2 problems:
> * What if a cache falls completely idle? If there is freeing activity on
> the cache, then the cache is active, thus there is no need to flush
> * I don't think it's a good idea to add logic into the path that's
> executed for every kfree/kmem_cache_free. A timer might not be very
> pretty, but is definitively more efficient.
> > The patch add shrinker callbacks was posted to linux-mm Sunday and
> > to lkml on Thursday.
>
> I'll read them.
> Is it guaranteed that the shrinker callbacks are called on all cpus, or
> could some cpu binding happen?
There is no guarantee. The best we could use them for is to link the 'pressure'
on the percpu stuff to vm pressure. From the above is does look like timers
are the way to go.
Ed
--
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/
next prev parent reply other threads:[~2002-09-30 11:18 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 [this message]
2002-09-30 16:33 ` Manfred Spraul
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=200209300718.57382.tomlins@cam.org \
--to=tomlins@cam.org \
--cc=linux-mm@kvack.org \
--cc=manfred@colorfullife.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