From: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-mm <linux-mm@kvack.org>
Subject: [PATCH] background swapping enabled again
Date: Thu, 19 Mar 1998 20:50:15 +0100 (MET) [thread overview]
Message-ID: <Pine.LNX.3.91.980319204635.1963A-100000@mirkwood.dummy.home> (raw)
Hi Linus,
I decided to go with your free_pages_available() test,
since Ben and Stephen will provide the framework to
implement it properly even on small-mem machines...
But background swapping (when eg. BUFFER_MEM > max)
has been made impossible in .90.
Since this breaks the maximum limit for buffermem, I
have made the following patch...
It makes sure we at least do SWAP_CLUSTER_MAX calls
to try_to_free_page(), so background works again...
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.orig Thu Mar 19 01:45:42 1998
+++ vmscan.c Thu Mar 19 20:46:09 1998
@@ -545,6 +545,7 @@
add_wait_queue(&kswapd_wait, &wait);
while (1) {
int tries;
+ int tried = 0;
current->state = TASK_INTERRUPTIBLE;
kswapd_awake = 0;
@@ -563,12 +564,12 @@
if (tries < freepages.min) {
tries = freepages.min;
}
- if (nr_free_pages < freepages.high + freepages.low)
+ if (nr_free_pages < freepages.low)
tries <<= 1;
while (tries--) {
int gfp_mask;
- if (free_memory_available())
+ if (free_memory_available() && ++tried > SWAP_CLUSTER_MAX)
break;
gfp_mask = __GFP_IO;
try_to_free_page(gfp_mask);
reply other threads:[~1998-03-19 19:53 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.980319204635.1963A-100000@mirkwood.dummy.home \
--to=h.h.vanriel@fys.ruu.nl \
--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