linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel <linux-kernel@vger.rutgers.edu>,
	linux-mm <linux-mm@kvack.org>
Subject: [PATCH] milder kswapd
Date: Wed, 11 Mar 1998 16:29:11 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.3.91.980311162707.5838C-100000@mirkwood.dummy.home> (raw)

Hi there,

since many of you have complained that kswapd is a tad
agressive in 2.1.89, I've made the following patch to
counter that 'bad behaviour'.

happy hacking,

Rik.

(and don't forget your /proc/sys/vm/swapctl!)
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page          | Scouting       webmaster |
|        - kswapd ask-him & complain-to guy | Vries    cubscout leader |
|     http://www.fys.ruu.nl/~riel/          | <H.H.vanRiel@fys.ruu.nl> |
+-------------------------------------------+--------------------------+

--- linux/mm/vmscan.c.orig	Wed Mar 11 16:23:17 1998
+++ linux/mm/vmscan.c	Wed Mar 11 16:25:52 1998
@@ -511,7 +511,6 @@
        printk ("Starting kswapd v%.*s\n", i, s);
 }
 
-#define MAX_SWAP_FAIL 3
 /*
  * The background pageout daemon.
  * Started as a kernel thread from the init process.
@@ -559,15 +558,8 @@
 		if (tries < min_free_pages) {
 			tries = min_free_pages;
 		}
-		else if (nr_free_pages < (free_pages_high + free_pages_low) / 2) {
+		else if (nr_free_pages < (free_pages_low + min_free_pages) / 2) 
 			tries <<= 1;
-			if (nr_free_pages < free_pages_low) {
-				tries <<= 1;
-				if (nr_free_pages <= min_free_pages) {
-					tries <<= 1;
-				}
-			}
-		}
 		while (tries--) {
 			int gfp_mask;
 

                 reply	other threads:[~1998-03-11 17:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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.980311162707.5838C-100000@mirkwood.dummy.home \
    --to=h.h.vanriel@fys.ruu.nl \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --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