From: Andrew Morton <akpm@osdl.org>
To: Nick Piggin <piggin@cyberone.com.au>
Cc: linux-kernel@vger.kernel.org, Nikita@Namesys.COM
Subject: Re: 2.6.4-rc1-mm1
Date: Sun, 29 Feb 2004 18:05:19 -0800 [thread overview]
Message-ID: <20040229180519.205b527d.akpm@osdl.org> (raw)
In-Reply-To: <40429228.1080301@cyberone.com.au>
Nick Piggin <piggin@cyberone.com.au> wrote:
>
> >> Should I start testing again, or are you still doing more to vmscan?
> >>
> >
> >Now would be a good time. The only thing I'm likely to look at in the next
> >several days is accounting for the slab fragmentation. My current thinking
> >is to solve that by making slab account for the number of objects and the
> >number of pages, and to use that in shrink_dcache_memory(), so it doesn't
> >touch vmscan.c at all.
> >
> >
>
> My thinking is to go by number of pages. Then you get to tell the
> shrinker: we scanned this many pages of LRU, so please scan an
> equivalent percentage of slab *pages*.
The metric which we need to be balancing on here is
(probability that the object will be needed again) *
(number of seeks to reestablish the object) /
(size of object).
The first two factors are wildass guesses. I figure a pagecache page is
worth maybe 1/8th of a seek and an inode is worth, umm, more than that.
Maybe half a seek? Our accounting for this is currently way off and needs
to be tuned up.
One big problem with implementing slab balancing is that the inode cache is
a separate slab per filesystem, so any fancy accounting of icache requires
visits to all filesystems.
Now it could well be that inode_unused is a complete waste of space. After
all, these are inodes whose dentries have been reaped - it is unlikely that
they're much use. And it could be that their backing block is still in
pagecache anyway.
So if getting the dcache accounted for is not sufficient then it might be
necessary to either shrink the heck out of inode_unused of just kill it
altogether.
> You can then translate this to number of slab objects before scanning.
>
> Oh, apart from that, there is still one thing that I'm not sure is
> correct about slab scanning... we scan slab in response to scanning
> a part of the inactive list, but we apply this pressure as if it
> were a ratio of active + inactive lists.
>
> This will cause slab to be scanned less, but my main worry is that
> it makes slab scanning behaviour dependant on the ratio of active to
> inactive list size: the bigger your active list, the less slab will
> be scanned which I think is silly. But I might be wrong.
No, you're right - it doesn't make a lot of sense.
next prev parent reply other threads:[~2004-03-01 2:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-29 22:06 2.6.4-rc1-mm1 Andrew Morton
2004-02-29 22:24 ` 2.6.4-rc1-mm1 Christoph Hellwig
2004-02-29 22:31 ` 2.6.4-rc1-mm1 Andrew Morton
2004-03-02 13:52 ` 2.6.4-rc1-mm1 bill davidsen
2004-03-01 1:02 ` 2.6.4-rc1-mm1 Nick Piggin
2004-03-01 1:14 ` 2.6.4-rc1-mm1 Andrew Morton
2004-03-01 1:30 ` 2.6.4-rc1-mm1 Nick Piggin
2004-03-01 1:45 ` 2.6.4-rc1-mm1 Nick Piggin
2004-03-01 2:05 ` Andrew Morton [this message]
2004-03-01 1:10 ` 2.6.4-rc1-mm1: multiple definitions of `debug' Adrian Bunk
2004-03-01 1:41 ` Andrew Morton
2004-03-01 17:49 ` Torrey Hoffman
2004-03-01 1:39 ` 2.6.4-rc1-mm1 Marc-Christian Petersen
2004-03-01 1:46 ` 2.6.4-rc1-mm1 Marc-Christian Petersen
2004-03-01 11:26 ` posix message queues, was 2.6.4-rc1-mm1 bert hubert
2004-03-01 14:27 ` Krzysztof Benedyczak
2004-03-01 16:41 ` 2.6.4-rc1-mm1 Prakash K. Cheemplavam
2004-03-02 13:38 ` 2.6.4-rc1-mm1 Prakash K. Cheemplavam
2004-03-02 20:45 ` 2.6.4-rc1-mm1, as scheduler causes higher idle temp? Prakash K. Cheemplavam
2004-03-02 21:11 ` Andrew Morton
2004-03-02 21:39 ` Prakash K. Cheemplavam
2004-03-02 0:20 2.6.4-rc1-mm1 Pedro Larroy
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=20040229180519.205b527d.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=Nikita@Namesys.COM \
--cc=linux-kernel@vger.kernel.org \
--cc=piggin@cyberone.com.au \
/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
all inboxes | Powered by JetHome®