From: "Dr. Werner Fink" <werner@suse.de>
To: Rik van Riel <H.H.vanRiel@phys.uu.nl>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Linus Torvalds <torvalds@transmeta.com>,
linux-mm <linux-mm@kvack.org>,
Kernel Mailing List <linux-kernel@vger.rutgers.edu>
Subject: Re: Running 2.1.129 at extrem load [patch] (Was: Linux-2.1.129..)
Date: Mon, 23 Nov 1998 23:35:50 +0100 [thread overview]
Message-ID: <19981123233550.34576@boole.suse.de> (raw)
In-Reply-To: <Pine.LNX.3.96.981123224942.6626B-100000@mirkwood.dummy.home>; from Rik van Riel on Mon, Nov 23, 1998 at 10:59:38PM +0100
> > struct page *next_hash;
> > atomic_t count;
> > - unsigned int unused;
> > + unsigned int lifetime;
> > unsigned long flags; /* atomic flags, some possibly updated asynchronously */
>
> Hmm, this looks suspiciously like a new incarnation of
> page aging (which we want to avoid, at least in some
> parts of the kernel).
Yep ... we should avoid removing this `unused'.
> > --- linux-2.1.129/mm/filemap.c Thu Nov 19 20:44:18 1998
> > +++ linux/mm/filemap.c Mon Nov 23 13:38:47 1998
> > @@ -167,15 +167,14 @@
> > case 1:
> > /* is it a swap-cache or page-cache page? */
> > if (page->inode) {
> > - /* Throw swap-cache pages away more aggressively */
> > - if (PageSwapCache(page)) {
> > - delete_from_swap_cache(page);
> > - return 1;
> > - }
> > if (test_and_clear_bit(PG_referenced, &page->flags))
> > break;
> > if (pgcache_under_min())
> > break;
> > + if (PageSwapCache(page)) {
> > + delete_from_swap_cache(page);
> > + return 1;
> > + }
>
> This piece looks good and will result in us keeping swap cached
> pages when the page cache is low. We might want to include this
> in the current kernel tree, together with the removal of the
> free_after construction.
Hmmm ... don't forget the change in __get_free_pages(). Without this
page I see random SIGBUS at extreme load killing random processes.
[...]
> Sorry Werner, but this is exactly the place where we need to
> remove any from of page aging. We can do some kind of aging
> in the swap cache, page cache and buffer cache, but doing
> aging here is just prohibitively expensive and needs to be
> removed.
>
> IMHO a better construction be to have a page->fresh flag
> which would be set on unmapping from swap_out(). Then
> shrink_mmap() would free pages with page->fresh reset
> and reset page->fresh if it is set. This way we can
> free a page at it's second scan so we avoid freeing
> a page that was just unmapped (and giving each page a
> bit of a chance to undergo cheap aging).
Furthermore highly used pages should go not to often
into the swap cache ... this leads to something like
a score list of often used pages. Such a score value
instead of a flag could be easily decreased by
shrink_mmap() scanning all pages.
Werner
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-11-23 22:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.3.95.981119002335.838A-100000@penguin.transmeta.com>
1998-11-19 21:34 ` Linux-2.1.129 Dr. Werner Fink
1998-11-19 21:58 ` Linux-2.1.129 Rik van Riel
1998-11-20 12:09 ` Linux-2.1.129 Dr. Werner Fink
1998-11-19 22:33 ` Linux-2.1.129 Linus Torvalds
1998-11-23 17:13 ` Linux-2.1.129 Stephen C. Tweedie
1998-11-23 19:16 ` Linux-2.1.129 Eric W. Biederman
1998-11-23 20:02 ` Linux-2.1.129 Linus Torvalds
1998-11-23 21:25 ` Linux-2.1.129 Rik van Riel
1998-11-23 22:19 ` Linux-2.1.129 Dr. Werner Fink
1998-11-24 3:37 ` Linux-2.1.129 Eric W. Biederman
1998-11-24 15:25 ` Linux-2.1.129 Stephen C. Tweedie
1998-11-24 17:33 ` Linux-2.1.129 Linus Torvalds
1998-11-24 19:59 ` Linux-2.1.129 Rik van Riel
1998-11-24 20:45 ` Linux-2.1.129 Linus Torvalds
1998-11-25 14:19 ` Linux-2.1.129 Stephen C. Tweedie
1998-11-25 21:07 ` Linux-2.1.129 Eric W. Biederman
1998-11-26 12:57 ` Linux-2.1.129 Stephen C. Tweedie
1998-11-25 20:33 ` Linux-2.1.129 Zlatko Calusic
1998-11-23 19:46 ` Linux-2.1.129 Eric W. Biederman
1998-11-23 21:18 ` Linux-2.1.129 Rik van Riel
1998-11-24 6:28 ` Linux-2.1.129 Eric W. Biederman
1998-11-24 7:56 ` Linux-2.1.129 Rik van Riel
1998-11-24 15:48 ` Linux-2.1.129 Stephen C. Tweedie
1998-11-24 15:38 ` Linux-2.1.129 Stephen C. Tweedie
1998-11-23 20:12 ` Linux-2.1.129 Rik van Riel
1998-11-23 20:53 ` Running 2.1.129 at extrem load [patch] (Was: Linux-2.1.129..) Dr. Werner Fink
1998-11-23 21:59 ` Rik van Riel
1998-11-23 22:35 ` Dr. Werner Fink [this message]
1998-11-24 12:38 ` Dr. Werner Fink
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=19981123233550.34576@boole.suse.de \
--to=werner@suse.de \
--cc=H.H.vanRiel@phys.uu.nl \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.com \
--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