From: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.rutgers.edu>
Subject: [PATCH] kswapd goal setting
Date: Mon, 30 Mar 1998 18:28:50 +0200 (MET DST) [thread overview]
Message-ID: <Pine.LNX.3.91.980330182622.575B-100000@mirkwood.dummy.home> (raw)
Hi Linus,
after reading the messages in linux-kernel carefully, I
made the following patch (with fixed switch-points).
The choice of the switching points is based on the messages
posted to linux-kernel in the last few days.
It patches cleanly against 2.1.92-pre1, but should also
work for 2.1.91 and 2.1.90 (?).
Rik.
+-------------------------------------------+--------------------------+
| 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> |
+-------------------------------------------+--------------------------+
--- vmscan.c.pre92.1 Mon Mar 30 18:09:44 1998
+++ vmscan.c Mon Mar 30 18:25:46 1998
@@ -39,6 +39,13 @@
*/
int swapout_interval = HZ / 4;
+/*
+ * This variable is used to determine the final goal of
+ * kswapd's quest...
+ */
+
+static int kswapd_goal = 0;
+
/*
* The wait queue for waking up the pageout daemon:
*/
@@ -508,6 +515,16 @@
s++, i = e - s;
else
s = revision, i = -1;
+ /* Here we set the goal for kswapd,
+ * if it's a 40+ MB machine, the full goal
+ * is used, for 16- MB machines we use a even
+ * less agressive goal. -- Rik.
+ */
+ if (num_physpages < 10240) {
+ kswapd_goal++;
+ if (num_physpages < 4096)
+ kswapd_goal++;
+ }
printk ("Starting kswapd v%.*s\n", i, s);
}
@@ -574,7 +591,7 @@
while (tries--) {
int gfp_mask;
- if (++tried > SWAP_CLUSTER_MAX && free_memory_available(0))
+ if (++tried > SWAP_CLUSTER_MAX && free_memory_available(kswapd_goal))
break;
gfp_mask = __GFP_IO;
try_to_free_page(gfp_mask);
reply other threads:[~1998-03-30 17:15 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.980330182622.575B-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