mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@bonn-fries.net>
To: Stephan von Krawczynski <skraw@ithnet.com>,
	Bill Davidsen <davidsen@tmr.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: broken VM in 2.4.10-pre9
Date: Sat, 22 Sep 2001 13:01:02 +0200	[thread overview]
Message-ID: <20010922105332Z16449-2757+1233@humbolt.nl.linux.org> (raw)
In-Reply-To: <20010916204528.6fd48f5b.skraw@ithnet.com> <Pine.LNX.3.96.1010920231251.26679B-100000@gatekeeper.tmr.com> <20010921124338.4e31a635.skraw@ithnet.com>
In-Reply-To: <20010921124338.4e31a635.skraw@ithnet.com>

On September 21, 2001 12:43 pm, Stephan von Krawczynski wrote:
> Sorry to followup to the same post again, but I just read across another thread
> where people discuss heavily about aging up by 3 and down by 1 or vice versa is
> considered to be better or worse. The real problem behind this is that they are
> trying to bring some order in the pages by the age. Unfortunately this cannot
> really work out well, because you will _always_ end up with few or a lot of
> pages with the same age, which does not help you all that much in a situation
> where you need to know who is the _best one_ that is to be dropped next. In
> this drawing situation you have nothing to rely on but the age and some rough
> guesses (or even worse: performance issues, _not_ to walk the whole tree to
> find the best fitting page). This _solely_ comes from the fact that you have no
> steady rising order in page->age ordering (is this correct english for this
> mathematical term?). You _cannot_ know from the current function. So it must be
> considered _bad_. On the other hand a list is always ordered and therefore does
> not have this problem.
> Shit, if I only were able to implement that. Can anybody help me to proove my
> point?

You got your wish.  Andrea's mm patch introduced into the main tree at
2.4.10-pre11 uses a standard LRU:

+               if (PageTestandClearReferenced(page)) {
+                       if (PageInactive(page)) {
+                               del_page_from_inactive_list(page);
+                               add_page_to_active_list(page);
+                       } else if (PageActive(page)) {
+                               list_del(entry);
+                               list_add(entry, &active_list);

<musings>
There are arguments about whether page aging can be superior to standard LRU,
and I personally believe it can be, but there's no question that ordinary LRU
is a lot easier to implement correctly and will perform a lot better than
incorrectly implemented/untuned page aging.

The arguments in support of aging over LRU that I'm aware of are:

  - incrementing an age is more efficient than resetting several LRU list links
  - also captures some frequency-of-use information
  - it can be implemented in hardware (not that that matters much)
  - allows more scope for tuning/balancing (and also rope to hang oneself)

The big problem with aging is that unless it's entirely correctly balanced its
just not going to work very well.  To balance it well requires knowing a lot
about rates of list scanning and so on.  Matt Dillon perfected this art in BSD,
but we never did, being preoccupied with things like just getting the mm
scanners to activate when required, and sorting out our special complexities
like zones and highmem buffers.  Probably another few months of working on it
would let us get past the remaining structural problems and actually start
tuning it, but we've already made people wait way too long for a stable 2.4.
A more robust strategy makes a lot of sense right now.  We can still play with
stronger magic in 2.5, and of course Rik's aging strategy will continue to be
developed in Alan's tree while Andrea's is still going through the test of
fire.
</musings>

I'll keep reading Andrea's code and maybe I'll be able to shed some more light
on the algorithms he's using, since he doesn't seem to be in a big hurry to
do that himself.  (Hi Andrea ;-)

--
Daniel

  parent reply	other threads:[~2001-09-22 10:53 UTC|newest]

Thread overview: 133+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-16 15:19 Ricardo Galli
2001-09-16 15:23 ` Michael Rothwell
2001-09-16 16:33   ` Rik van Riel
2001-09-16 16:50     ` Andreas Steinmetz
2001-09-16 17:12       ` Ricardo Galli
2001-09-16 17:06     ` Ricardo Galli
2001-09-16 17:18       ` Jeremy Zawodny
2001-09-16 18:45       ` Stephan von Krawczynski
2001-09-21  3:16         ` Bill Davidsen
2001-09-21 10:21         ` Stephan von Krawczynski
2001-09-21 14:08           ` Bill Davidsen
2001-09-21 14:23             ` Rik van Riel
2001-09-23 13:13               ` Eric W. Biederman
2001-09-23 13:27                 ` Rik van Riel
2001-09-21 10:43         ` Stephan von Krawczynski
2001-09-21 12:13           ` Rik van Riel
2001-09-21 12:55           ` Stephan von Krawczynski
2001-09-21 13:01             ` Rik van Riel
2001-09-22 11:01           ` Daniel Phillips [this message]
2001-09-22 20:05             ` Rik van Riel
2001-09-24  9:36           ` Linux VM design VDA
2001-09-24 11:06             ` Dave Jones
2001-09-24 12:15               ` Kirill Ratkin
2001-09-24 13:29             ` Rik van Riel
2001-09-24 14:05               ` VDA
2001-09-24 14:37                 ` Rik van Riel
2001-09-24 14:42                 ` Rik van Riel
2001-09-24 18:37             ` Daniel Phillips
2001-09-24 19:32               ` Rik van Riel
2001-09-24 17:27                 ` Rob Landley
2001-09-24 21:48                   ` Rik van Riel
2001-09-25  9:58                 ` Daniel Phillips
2001-09-25 16:03               ` bill davidsen
2001-09-24 18:46             ` Jonathan Morton
2001-09-24 19:16               ` Daniel Phillips
2001-09-24 19:11             ` Dan Mann
2001-09-25 10:55             ` VDA
2001-09-16 18:16     ` broken VM in 2.4.10-pre9 Stephan von Krawczynski
2001-09-16 19:43     ` Linus Torvalds
2001-09-16 19:57       ` Rik van Riel
2001-09-16 20:17       ` Rik van Riel
2001-09-16 20:29       ` Andreas Steinmetz
2001-09-16 21:28         ` Linus Torvalds
2001-09-16 22:47           ` Alex Bligh - linux-kernel
2001-09-16 22:55             ` Linus Torvalds
2001-09-16 22:59           ` Stephan von Krawczynski
2001-09-16 22:14             ` Linus Torvalds
2001-09-16 23:29               ` Stephan von Krawczynski
2001-09-17 15:35             ` Stephan von Krawczynski
2001-09-17 15:51               ` Linus Torvalds
2001-09-17 16:34               ` Stephan von Krawczynski
2001-09-17 16:46                 ` Linus Torvalds
2001-09-17 17:20                 ` Stephan von Krawczynski
2001-09-17 17:37                   ` Linus Torvalds
2001-09-17  0:37       ` Daniel Phillips
2001-09-17  1:07         ` Linus Torvalds
2001-09-17  2:23           ` Daniel Phillips
2001-09-17  5:11           ` Jan Harkes
2001-09-17 12:33             ` Daniel Phillips
2001-09-17 12:41               ` Rik van Riel
2001-09-17 14:49                 ` Daniel Phillips
2001-09-17 16:14               ` Jan Harkes
2001-09-17 16:34                 ` Linus Torvalds
2001-09-17 15:38             ` Linus Torvalds
2001-09-17 12:26           ` Rik van Riel
2001-09-17 15:42             ` Linus Torvalds
2001-09-18 12:04               ` Rik van Riel
2001-09-17 17:33             ` Linus Torvalds
2001-09-17 18:07               ` Linus Torvalds
2001-09-18 12:09               ` Rik van Riel
2001-09-21  3:10       ` Bill Davidsen
2001-09-17  8:06     ` Eric W. Biederman
2001-09-17 12:12       ` Rik van Riel
2001-09-17 15:45         ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2001-09-22 19:59 Peter Magnusson
2001-09-22 20:46 ` Jan Harkes
2001-09-22 21:46   ` Peter Magnusson
2001-09-22 19:59 Peter Magnusson
2001-09-22 20:18 ` Rik van Riel
2001-09-19 22:15 Rob Fuller
2001-09-19 22:21 ` David S. Miller
2001-09-19 22:26 ` Christoph Hellwig
2001-09-19 22:30 ` Alan Cox
2001-09-19 22:48 ` Eric W. Biederman
2001-09-19 22:51 ` Bryan O'Sullivan
2001-09-20  3:16 ` GOTO Masanori
2001-09-20  7:38   ` Christoph Hellwig
2001-09-17 15:40 Rob Fuller
2001-09-17 16:03 ` Eric W. Biederman
2001-09-19  9:45   ` Daniel Phillips
2001-09-19 19:45     ` Alan Cox
2001-09-19 21:03       ` Eric W. Biederman
2001-09-19 22:04         ` Alan Cox
2001-09-19 22:26           ` Eric W. Biederman
2001-09-19 23:05           ` Rik van Riel
2001-09-20 11:28           ` Daniel Phillips
2001-09-20 12:06             ` Rik van Riel
2001-09-21  8:13               ` Daniel Phillips
2001-09-21 12:10                 ` Rik van Riel
2001-09-21 15:27                 ` Jan Harkes
2001-09-22  7:09                   ` Daniel Phillips
2001-09-25 11:04                     ` Mike Fedyk
2001-09-20 12:57             ` Alan Cox
2001-09-20 13:40               ` Daniel Phillips
2001-09-24 22:50           ` Pavel Machek
2001-09-26 18:22             ` Marcelo Tosatti
2001-09-26 23:44               ` Pavel Machek
2001-09-27 13:52                 ` Eric W. Biederman
2001-10-01 11:37                 ` Marcelo Tosatti
2001-09-19 23:00         ` Rik van Riel
2001-09-21  8:23           ` Eric W. Biederman
2001-09-21 12:01             ` Rik van Riel
2001-09-22  2:14             ` Alexander Viro
2001-09-22  3:09               ` Rik van Riel
2001-09-21 14:29           ` Gábor Lénárt
2001-09-21 14:35             ` Horst von Brand
2001-09-19 21:37       ` Eric W. Biederman
2001-09-19 21:55       ` David S. Miller
2001-09-20 13:02         ` Rik van Riel
2001-09-16 19:07 vm rewrite ready [Re: broken VM in 2.4.10-pre9] Rik van Riel
2001-09-16 15:19 ` broken VM in 2.4.10-pre9 Phillip Susi
2001-09-16 19:33   ` Jeremy Zawodny
2001-09-16 19:52   ` Rik van Riel
     [not found] <fa.i95if5v.74un2p@ifi.uio.no>
     [not found] ` <fa.gu977tv.1b7u0g9@ifi.uio.no>
2001-09-16 18:06   ` Dan Maas
2001-09-15 22:43 Peter Magnusson
2001-09-15 23:50 ` Jan Harkes
2001-09-16  5:31 ` Linus Torvalds
2001-09-16  8:45   ` Eric W. Biederman
2001-09-17 10:25 ` Tonu Samuel
2001-09-16 16:47   ` Jeremy Zawodny
2001-09-16 18:36     ` Alan Cox
2001-09-16 19:38       ` Linus Torvalds
2001-09-16 19:37   ` Linus Torvalds
2001-09-17 14:04     ` Olaf Zaplinski

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=20010922105332Z16449-2757+1233@humbolt.nl.linux.org \
    --to=phillips@bonn-fries.net \
    --cc=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skraw@ithnet.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®