From: Craig Kulesa <ckulesa@as.arizona.edu>
To: Ed Tomlinson <tomlins@cam.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Rik van Riel <riel@conectiva.com.br>
Subject: Re: [PATCH 2/2] move slab pages to the lru, for 2.5.27
Date: Sun, 21 Jul 2002 14:24:07 -0700 (MST) [thread overview]
Message-ID: <Pine.LNX.4.44.0207211253080.13101-100000@loke.as.arizona.edu> (raw)
In-Reply-To: <200207210933.01211.tomlins@cam.org>
On Sun, 21 Jul 2002, Ed Tomlinson wrote:
> Well not quite random. It prunes the oldest entries.
Yes, you're right, I was speaking sloppily.
I meant "random" in the sense that "those pruned entries don't correspond
to the page I'm scanning right now in refill_inactive_zone". Establishing
that connection seems simultaneously very interesting and confusing. :)
> What I tried to do here was keep the rate of aging in sync with the VM.
I think it works darn well too! But maybe a page-centric freeing system
would do that too. In your patch, you distinguish between:
- aging prunable slab pages by "counting" the slab pages
to determine the rate of pruning, and using the caches' internal
lru order to determine the actual entries that get pruned
and
- aging non-prunable slabs with page->age.
Can we unify them and just use page->age (or, in the case of stock 2.5.27,
do it in the VM's LRU order)? That is, if you encounter a cold slab page
in scanning the active list, try to prune just *that* page's slab
resources. If it manages to free the slab, free the page. Otherwise,
try again next time we visit the page.
> Thats a question I have asked myself too. What could be done is, scan
> the entries in the slab encountered,
I think *that's* the part I'm having difficulty envisioning. If
cachep->pruner, then I might find myself in dcache.c (for example)
living in a pruner callback that no longer remembers "my" slab page.
Seems like we need a "dentry_lookup" method that returns a list of
[di]cache objects living in a specified slab (page). Then feed that
list to a modified prune_[di]cache and see if that frees the slab.
Not the current "prune 'N' old entries from the cache, and I don't care
where they live in memory". We're coming in instead and saying "I _know_
this page is old, so try to free its entries". This is, I suppose, saying
that we want to throw out (or at least ignore) the caches' internal LRU
aging methods and use the VM's LRU order (2.5.27), or page->age (2.5.27
plus full rmap). Uh oh. This is getting scary. And maybe wrong. :)
So, that list-returning method has me befuddled. And maybe we don't
really want to do any of this. Which is why I asked. :)
> Looking at the Intermezzo dcache code, I think you made the right choise.
> I do not think this needs a pruner method.
Whew! :)
Comments?
Craig Kulesa
Steward Obs.
Univ. of Arizona
--
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 parent reply other threads:[~2002-07-21 21:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200207210933.01211.tomlins@cam.org>
2002-07-21 21:24 ` Craig Kulesa [this message]
2002-07-21 23:15 ` Ed Tomlinson
[not found] <200207242012.59150.tomlins@cam.org>
2002-07-25 12:00 ` Craig Kulesa
2002-07-21 11:24 Craig Kulesa
2002-07-21 21:31 ` William Lee Irwin III
2002-07-22 7:08 ` Craig Kulesa
2002-07-22 18:54 ` Steven Cole
2002-07-22 22:21 ` William Lee Irwin III
2002-07-22 22:36 ` Craig Kulesa
2002-07-23 4:36 ` William Lee Irwin III
2002-07-23 14:31 ` Steven Cole
2002-07-24 20:28 ` Steven Cole
2002-07-24 21:02 ` Steven Cole
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.44.0207211253080.13101-100000@loke.as.arizona.edu \
--to=ckulesa@as.arizona.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
--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