From: Daniel Phillips <phillips@bonn-fries.net>
To: ebiederm@xmission.com (Eric W. Biederman),
Rik van Riel <riel@conectiva.com.br>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
Andrew Morton <akpm@zip.com.au>, <linux-kernel@vger.kernel.org>,
Ben LaHaise <bcrl@redhat.com>,
Mike Galbraith <mikeg@wen-online.de>
Subject: Re: [RFC] Optimization for use-once pages
Date: Thu, 26 Jul 2001 14:06:29 +0200 [thread overview]
Message-ID: <0107261406290L.00907@starship> (raw)
In-Reply-To: <Pine.LNX.4.33L.0107251340550.20326-100000@duckman.distro.conectiva> <m1ae1sf5od.fsf@frodo.biederman.org>
In-Reply-To: <m1ae1sf5od.fsf@frodo.biederman.org>
On Thursday 26 July 2001 10:36, Eric W. Biederman wrote:
> Rik van Riel <riel@conectiva.com.br> writes:
> > On Wed, 25 Jul 2001, Daniel Phillips wrote:
> > > On Wednesday 25 July 2001 08:33, Marcelo Tosatti wrote:
> > > > Now I'm not sure why directly adding swapcache pages to the
> > > > inactive dirty lits with 0 zero age improves things.
> > >
> > > Because it moves the page rapidly down the inactive queue towards
> > > the ->writepage instead of leaving it floating around on the
> > > active ring waiting to be noticed. We already know we want to
> > > evict that page,
> >
> > We don't.
>
> Agreed. The kinds of ``aging'' don't match up so we can't tell if
> it meets our usual criteria for aging.
Well, in the absence of of benchmark evidence its hard to tell how
valuable the usual criteria really are. That's another topic though,
because the question here is not how the aging matches up, but how the
inactive queue handling matches up, see below.
> > The page gets unmapped and added to the swap cache the first
> > time it wasn't referenced by the process.
> >
> > This is before any page aging is done.
>
> Actually there has been aging done. Unless you completely disable
> testing for pte_young. It is a different kind of aging but it is
> aging.
In the case of a process page and in the case of a file IO page the
situation is the same: we have decided to put the page on trial. Once
we have arrived at that decision its previous history doesn't matter,
so it makes sense to set its age to a known state. In this case it's
0, meaning "on trial".
Consider that the process page will only ever be down-aged after being
unmapped. So if we put it on the active queue, it just acts like a
big, slow, inefficient timer. Why not put it on a fifo queue instead?
It's the same thing, just more efficient. But we already have a fifo
queue, the inactive_dirty_queue, which we are using for everything
else, so why not use it for this too, then at least we know its fair.
In other words, there is no obvious need to treat a process page
differently from a file IO page once decide to put it on trial.
There does seem to be a dangling thread here though - when a process
page is unmapped and added to swap cache in try_to_swap_out then later
faulted back in, I don't see where we "rescue" the page from the
inactive queue. Maybe I'm just not looking hard enough.
--
Daniel
next prev parent reply other threads:[~2001-07-26 12:02 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0107251802300B.00907@starship>
2001-07-25 16:41 ` [RFC] Optimization for use-once pages Rik van Riel
2001-07-25 17:46 ` Daniel Phillips
2001-07-26 8:36 ` Eric W. Biederman
2001-07-26 12:06 ` Daniel Phillips [this message]
2001-07-26 10:38 ` Marcelo Tosatti
2001-07-26 12:17 ` Daniel Phillips
2001-07-26 3:27 Ed Tomlinson
[not found] <010301c11463$1ee00440$294b82ce@connecttech.com>
2001-07-24 17:07 ` Rik van Riel
2001-07-24 17:42 ` Stuart MacDonald
2001-07-24 17:51 ` Rik van Riel
2001-07-24 18:09 ` Stuart MacDonald
2001-07-24 18:15 ` Mike Castle
2001-07-24 18:21 ` Rik van Riel
2001-07-24 17:44 ` Mike Castle
2001-07-24 17:52 ` Rik van Riel
-- strict thread matches above, loose matches on Subject: below --
2001-07-24 3:47 Daniel Phillips
2001-07-24 12:38 ` jlnance
2001-07-24 16:56 ` Rik van Riel
2001-07-25 0:04 ` Daniel Phillips
2001-07-25 0:43 ` Anton Altaparmakov
2001-07-25 1:30 ` Daniel Phillips
2001-07-25 21:18 ` Steve Lord
2001-07-24 16:48 ` Linus Torvalds
2001-07-24 17:04 ` Rik van Riel
2001-07-24 18:14 ` Daniel Phillips
2001-07-24 18:15 ` Rik van Riel
2001-07-24 20:24 ` Patrick Dreker
2001-07-24 20:32 ` Rik van Riel
2001-07-24 22:16 ` Patrick Dreker
2001-07-24 22:25 ` Rik van Riel
2001-07-25 0:27 ` Linus Torvalds
2001-07-25 8:20 ` Patrick Dreker
2001-07-25 12:57 ` Martin Devera
2001-07-25 14:16 ` Daniel Phillips
2001-07-24 20:33 ` Linus Torvalds
2001-07-25 1:25 ` Daniel Phillips
2001-07-25 0:18 ` Daniel Phillips
2001-07-24 20:27 ` Marcelo Tosatti
2001-07-24 22:05 ` Rik van Riel
2001-07-24 20:53 ` Marcelo Tosatti
2001-07-24 22:27 ` Rik van Riel
2001-07-24 23:09 ` Daniel Phillips
2001-07-24 19:35 ` Rob Landley
2001-07-25 6:10 ` Marcelo Tosatti
2001-07-25 8:32 ` Eric W. Biederman
2001-07-25 12:53 ` Daniel Phillips
2001-07-25 16:05 ` Eric W. Biederman
2001-07-25 12:57 ` Daniel Phillips
2001-07-25 5:12 ` Andrew Morton
2001-07-25 6:33 ` Marcelo Tosatti
2001-07-30 18:09 ` Marcelo Tosatti
2001-07-24 22:41 ` Daniel Phillips
2001-07-24 22:22 ` Daniel Phillips
2001-07-25 2:31 ` 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=0107261406290L.00907@starship \
--to=phillips@bonn-fries.net \
--cc=akpm@zip.com.au \
--cc=bcrl@redhat.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=mikeg@wen-online.de \
--cc=riel@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