linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
To: "Dr. Werner Fink" <werner@suse.de>
Cc: sct@dcs.ed.ac.uk, torvalds@transmeta.com, blah@kvack.org,
	linux-mm@kvack.org
Subject: Re: [uPATCH] small kswapd improvement ???
Date: Wed, 4 Mar 1998 16:33:46 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.3.91.980304162522.24591A-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <199803041400.PAA06227@boole.fs100.suse.de>

On Wed, 4 Mar 1998, Dr. Werner Fink wrote:

> Maybe that's the reason why the bigger initial age for swapped in pages gives
> an improvement in 2.0.33 ... it's a ``better protection'' for often needed
> pages.

I think I'm going to try a more LRU like aging algorithm
now. (I've worked with some SGI boxes at school, and it
looks like they're less phrone to trashing)

Algorithm:

age_page(page) {
	page->age >>= 1;
}
touch_page(page) {
	page->age >>= 1;
	page->age |= 0x80;
}

and in vmscan.c/filemap.c:

-	if (page->age)
+	if (page->age < 1 << (MIN_SWAP_AGE + (nr_free_pages < free_pages_low 
? 1 : 0))

Then we could use the MIN_SWAP_AGE sysctl variable
to control the CPU usage / swap 'precision' of
kswapd. Even better would be a dynamic adjusment,
so kswapd would:
- never use more than 5% CPU (over a 10 sec interval?)
- use the maximum precision possible
- scan a maximum of MIN_SWAP_AGE + 2 times the number of
  pages it frees

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ).  | H.H.vanRiel@fys.ruu.nl       |
| ...submissions welcome...   | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+

      reply	other threads:[~1998-03-04 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-03 17:05 Rik van Riel
1998-03-03 19:09 ` Rik van Riel
1998-03-03 23:54 ` Stephen C. Tweedie
1998-03-03 23:59   ` Rik van Riel
1998-03-04  1:17     ` Benjamin C.R. LaHaise
1998-03-04 11:54       ` Rik van Riel
1998-03-04 21:11         ` Stephen C. Tweedie
1998-03-04 23:27           ` Rik van Riel
1998-03-04 14:00     ` Dr. Werner Fink
1998-03-04 15:33       ` Rik van Riel [this message]

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.3.91.980304162522.24591A-100000@mirkwood.dummy.home \
    --to=h.h.vanriel@fys.ruu.nl \
    --cc=blah@kvack.org \
    --cc=linux-mm@kvack.org \
    --cc=sct@dcs.ed.ac.uk \
    --cc=torvalds@transmeta.com \
    --cc=werner@suse.de \
    /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