From: Andrew Morton <akpm@osdl.org>
To: Robin Holt <holt@sgi.com>
Cc: tony.luck@intel.com, linux-ia64@vger.kernel.org, linux-mm@kvack.org
Subject: Re: ia64 needs to shake memory from quicklists when there is memory pressure.
Date: Mon, 14 Mar 2005 13:39:52 -0800 [thread overview]
Message-ID: <20050314133952.2a935d54.akpm@osdl.org> (raw)
In-Reply-To: <20050314164051.GB9117@lnx-holt.americas.sgi.com>
Robin Holt <holt@sgi.com> wrote:
>
> > > The "ideal" would be to have a node aware slab cache. Since that
> > > is probably a long time coming, I was wondering if there would be
> > > any possibility of getting some sort of hook into wakeup_kswapd(),
> > > kswapd(), or balance_pgdat(). Since the quicklists are maintained per
> > > cpu, we would need to perform an smp_call_function_single() for other
> > > cpus on this node. Is there some mechanism in place already to handle
> > > anything similar to this? Is there a better way to accomplish this?
> > > Can you offer any suggestions?
> > >
> >
> > Suggest you hook into the existing set_shrinker() API.
> >
> > Then, in the shrinker callback, perform reclaim of the calling CPU's
> > node's pages.
> >
> > Try to return the right numbers from the shrinker callback so that
> > shrink_slab() will keep this cache balanced wrt all the other ones which it
> > is managing.
>
> I wedged a shrinker in which simply does a smp_call_function() to invoke
> the cache shrinker. I did modify the shrinker function to return the
> number of pages freed, but am currently doing nothing with it as this
> will require a spinlock/atomic operation and am not ready to take that
> performance hit. The one issue I have is we lose information about
> which nodes to shake memory from and therefore end up calling the function
> for every node in the system. This appears very heavy handed.
As I said, "in the shrinker callback, perform reclaim of the calling CPU's
node's pages.". kswapd is already node-affine, as are callers of
try_to_free_pages().
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
prev parent reply other threads:[~2005-03-14 21:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 17:09 Robin Holt
2005-03-09 17:15 ` Martin J. Bligh
2005-03-14 16:24 ` Robin Holt
2005-03-14 16:37 ` Martin J. Bligh
2005-03-09 19:32 ` Andrew Morton
2005-03-14 16:40 ` Robin Holt
2005-03-14 21:39 ` Andrew Morton [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=20050314133952.2a935d54.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=holt@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tony.luck@intel.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