From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-mm <linux-mm@kvack.org>
Subject: [PATCH] low/high water marks in free_memory_available()
Date: Tue, 14 Apr 1998 23:38:50 +0200 (MET DST) [thread overview]
Message-ID: <Pine.LNX.3.91.980414233503.20137A-100000@mirkwood.dummy.home> (raw)
Hi Linus,
it seems that most of the thrashing in recent kernels comes
from the fact that kswapd is busy continuously.
Adding a very simple high/low water mark should help in most
cases, since kswapd won't run all of the time and the disk
will be idle more, giving other disk processes better performance.
Also, since a value is added to (num_physpages >> 5), it
isn't shifted by 4 anymore... On large-mem machines, >>5
is enough, and on small machines the added value will make
up for the difference (I hope).
The patch below is a very rough patch against 2.1.95.
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> |
+-------------------------------------------+--------------------------+
--- linux/mm/page_alloc.c.orig Tue Apr 14 23:27:23 1998
+++ linux/mm/page_alloc.c Tue Apr 14 23:34:21 1998
@@ -134,8 +134,10 @@
* It may not be, due to fragmentation, but we
* don't want to keep on forever trying to find
* free unfragmented memory.
+ * Added low/high water marks so the disk will be idle
+ * more of the time -- Rik, 14.4.98.
*/
- if (nr_free_pages > num_physpages >> 4)
+ if (nr_free_pages > (num_physpages >> 5) + (NR_MEM_LISTS - nr) * SWAP_CLUSTER_MAX)
return nr+1;
list = free_area + NR_MEM_LISTS;
reply other threads:[~1998-04-14 22:47 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.980414233503.20137A-100000@mirkwood.dummy.home \
--to=h.h.vanriel@phys.uu.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