mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Andrew Morton <akpm@zip.com.au>,
	Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch 1/13] minimal rmap
Date: Wed, 17 Jul 2002 22:13:51 +0200	[thread overview]
Message-ID: <E17UvBH-0004Pb-00@starship> (raw)
In-Reply-To: <Pine.LNX.4.44L.0207171657200.12241-100000@imladris.surriel.com>

On Wednesday 17 July 2002 22:04, Rik van Riel wrote:
> On Wed, 17 Jul 2002, Daniel Phillips wrote:
> > On Wednesday 17 July 2002 21:41, Rik van Riel wrote:
> > > On Wed, 17 Jul 2002, Daniel Phillips wrote:
> 
> > > Nope. If it hits every directory entry once, it'll hit every
> > > page with directory or inode information multiple times, causing
> > > that page to enter the active list and push out process pages.
> >
> > Yes, it could get challenging, but it's very desirable to do the
> > optimization somehow.  It's even more desirable to stay focussed on
> > the immediate issues, imho.
> 
> One simple way of getting this right is adding a new list
> to the VM, after which we'd have the following lists:
> 
> 1) new_pages list, restricted to a certain size (5% of RAM,
>    50% of the size of the inactive list, ...)
>    FIFO, new pages get added to the front of the list,
>    old pages get their accessed bit cleared and moved to
>    the inactive list
> 
> 2) inactive list, second chance fifo, target size 1/2 of active list ?
>    pages sit on the inactive list until the pageout code runs into
>    them, if the page was not accessed it will be evicted, if it was
>    accessed it will be moved to the active list
> 
> 3) active list, second chance fifo
>    pages on this list get rotated slowly, if they were referenced
>    they go back on the other side of the list, if they were not
>    referenced they go to the inactive list
> 
> With this setup, we should be able to catch things like updatedb
> and common streaming IO; their accesses to the pages should mostly
> happen while the pages are on the new_pages list (1) and they
> shouldn't get referenced again while on the inactive list.
> 
> Of course, this isn't the case for things like the directory
> /usr, but we _want_ to cache directories close to the top of
> the tree anyway. Besides, we won't have many of those directories.
> 
> An added advantage of this scheme is that we'll no longer need to
> touch the lru list in mark_page_accessed() (reducing contention)
> and use-once might actually work for mmap()d pages.

Yes, I've always felt that at least one new list is needed to do the job 
properly, and there are other considerations as well.  What we really want to 
do is treat a short burst of accesses to a page as a single access.  Right 
now we're only doing a very crude approximation of that, which happens to 
work for some common situations, of which updatedb is not one.

Obviously we don't want to be adding new lists and other experimental cruft 
just now.

-- 
Daniel

  reply	other threads:[~2002-07-17 20:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17  5:29 Andrew Morton
2002-07-17  8:24 ` Russell King
2002-07-17 12:10   ` Rik van Riel
2002-07-17 12:21 ` Rik van Riel
2002-07-17 17:57 ` Daniel Phillips
2002-07-17 18:11   ` Robert Love
2002-07-17 18:26     ` Daniel Phillips
2002-07-17 20:37       ` Rik van Riel
2002-07-17 20:42         ` Robert Love
2002-07-17 20:46           ` Daniel Phillips
2002-07-17 20:48             ` Robert Love
2002-07-17 19:31   ` Rik van Riel
2002-07-17 19:38     ` Daniel Phillips
2002-07-17 19:41       ` Rik van Riel
2002-07-17 19:55         ` Daniel Phillips
2002-07-17 20:04           ` Rik van Riel
2002-07-17 20:13             ` Daniel Phillips [this message]
2002-07-17 20:25               ` Rik van Riel
2002-07-17 20:25                 ` Rik van Riel
2002-07-17 20:36                   ` Daniel Phillips
2002-07-17 20:39                     ` Rik van Riel
2002-07-17 20:50                     ` Dave Jones
2002-07-17 20:53                     ` Robert Love
2002-07-22  2:40           ` Andrew Morton
2002-07-17 19:42     ` Robert Love

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=E17UvBH-0004Pb-00@starship \
    --to=phillips@arcor.de \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®