From: Linus Torvalds <torvalds@transmeta.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Subject: Re: Background scanning change on 2.4.6-pre1
Date: Thu, 7 Jun 2001 13:43:33 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.21.0106071330060.6510-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0106071545520.1156-100000@freak.distro.conectiva>
On Thu, 7 Jun 2001, Marcelo Tosatti wrote:
>
> Who did this change to refill_inactive_scan() in 2.4.6-pre1 ?
I think it was Andreas Dilger..
> /*
> * When we are background aging, we try to increase the page aging
> * information in the system.
> */
> if (!target)
> maxscan = nr_active_pages >> 4;
>
> This is going to make all pages have age 0 on an idle system after some
> time (the old code from Rik which has been replaced by this code tried to
> avoid that)
He posted a nice explanation of how this change made behaviour noticeably
smoother, and how you could actually see the nicer balance between the
active and inactive lists using osview.
The code is not necessarily "correct", but this patch was accompanied by
useful real-life user information.
Now, I think the problem with the old code was that it didn't do _any_
background page aging if "inactive" was large enough. And that really
doesn't make all that much sense. Background page aging is needed to
"sort" the active list, regardless of how many inactive pages there are.
The decision to not do page aging should not be based on the number of
inactive pages, and I think the patch is correct in that sense.
Now, if you were to change the code to something like
/* background scanning? */
if (!target) {
if (atomic_read(page_aging) <= 0)
return 0;
maxscan = nr_active_pages >> 4;
}
and make the "page_aging" be something that goes up when we age stuff up
and goes down when we age it down, and does the proper balancing, THAT
would probably be ok. Then the decision to not age in the background would
be based on whether we have lots of pages getting aged up or not.
Heuristics should make sense, not be "random".
Linus
--
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-07 20:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-07 18:50 Marcelo Tosatti
2001-06-07 20:43 ` Linus Torvalds [this message]
2001-06-07 20:51 ` Linus Torvalds
2001-06-07 19:30 ` Marcelo Tosatti
2001-06-07 21:08 ` Jonathan Morton
2001-06-07 21:05 ` Andreas Dilger
2001-06-09 3:26 ` Rik van Riel
2001-06-07 21:09 ` Andreas Dilger
[not found] <Pine.LNX.4.31.0106081313500.3244-100000@penguin.transmeta.com>
2001-06-08 19:20 ` Marcelo Tosatti
2001-06-08 21:27 ` David S. Miller
2001-06-08 19:59 ` Marcelo Tosatti
2001-06-08 21:47 ` David S. Miller
2001-06-08 21:51 ` Linus Torvalds
2001-06-08 20:44 ` Marcelo Tosatti
2001-06-08 22:33 ` Linus Torvalds
2001-06-08 21:10 ` Marcelo Tosatti
2001-06-09 0:12 ` Linus Torvalds
2001-06-09 3:48 ` Rik van Riel
2001-06-09 4:05 ` Linus Torvalds
2001-06-09 3:46 ` Rik van Riel
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=Pine.LNX.4.21.0106071330060.6510-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=linux-kernel@vger.kernel.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