From: "Stephen C. Tweedie" <sct@redhat.com>
To: Andrew Morton <andrewm@uow.edu.au>
Cc: Jonathan Morton <chromi@cyberspace.org>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
linux-mm@kvack.org
Subject: Re: [PATCH] reapswap for 2.4.5-ac10
Date: Wed, 6 Jun 2001 13:47:23 +0100 [thread overview]
Message-ID: <20010606134723.D1757@redhat.com> (raw)
In-Reply-To: <3B1E203C.5DC20103@uow.edu.au>; from andrewm@uow.edu.au on Wed, Jun 06, 2001 at 10:21:16PM +1000
Hi,
On Wed, Jun 06, 2001 at 10:21:16PM +1000, Andrew Morton wrote:
> Jonathan Morton wrote:
> >
> > Interesting observation. Something else though, which kswapd is guilty of
> > as well: consider a page shared among many processes, eg. part of a
> > library. As kswapd scans, the page is aged down for each process that uses
> > it. So glibc gets aged down many times more quickly than a non-shared
> > page, precisely the opposite of what we really want to happen.
>
> Perhaps the page should be aged down by (1 / page->count)?
The problem, of course, is that the referenced bit is not being
maintained at the same rate for all pages: we set it whenever we see a
mapping for it. So, in fact, glibc can get aged *up* more than other
pages: because it is in multiple VMs, the swap loop has the chance to
rejuvinate the page more often.
We really want the aging done elsewhere. Ideally, the VM page
scanning should be maintaining the state of the referenced bit on the
page, but the age manipulation should be done in the inactive-refill
loop. That way the referenced-bit state would be propagated into the
page age at a uniform rate for all pages. The difficulty is that the
refill-inactive loop and the try_to_swap_out loops proceed at
different rates, so it's not really possible at the moment to
determine all at once whether or not a page has been referenced in any
way since it was last seen.
Remember also that an unreferenced page gets unlinked from the page
tables in try_to_swap_out, so the presence of multiple inactive links
to glibc won't affect the swapper too much --- once those links have
been passed over once, they will be removed and we won't get extra
aging down done in subsequent passes.
--Stephen
--
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:[~2001-06-06 12:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-06 8:39 Jonathan Morton
2001-06-06 12:21 ` Andrew Morton
2001-06-06 12:47 ` Stephen C. Tweedie [this message]
2001-06-06 12:50 ` Jonathan Morton
2001-06-06 13:12 ` Andrew Morton
2001-06-06 16:44 ` Jonathan Morton
2001-06-06 17:01 ` Andrew Morton
2001-06-06 19:40 ` Jonathan Morton
2001-06-09 7:46 ` Rik van Riel
2001-06-06 19:18 ` Marcelo Tosatti
2001-06-06 21:13 ` Jonathan Morton
2001-06-07 14:45 ` John Stoffel
2001-06-07 16:45 ` Jonathan Morton
2001-06-11 4:43 ` Joseph A. Knapka
-- strict thread matches above, loose matches on Subject: below --
2001-06-05 19:48 Marcelo Tosatti
2001-06-05 22:14 ` Stephen C. Tweedie
2001-06-05 20:46 ` Marcelo Tosatti
2001-06-06 12:31 ` Hugh Dickins
2001-06-06 19:17 ` Marcelo Tosatti
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=20010606134723.D1757@redhat.com \
--to=sct@redhat.com \
--cc=andrewm@uow.edu.au \
--cc=chromi@cyberspace.org \
--cc=linux-mm@kvack.org \
--cc=marcelo@conectiva.com.br \
/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