From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: [RFT] balancing patch
Date: Mon, 27 Mar 2000 00:03:43 -0800 (PST) [thread overview]
Message-ID: <200003270803.AAA14950@google.engr.sgi.com> (raw)
People who are experiencing degraded performance in the latest 2.3
releases due to overactive kswapd can apply the attached patch to
see whether it helps them. If you try the patch, and see that it
helps, or hinders, your system performance, please let me know.
Thanks.
Kanoj
--- mm/page_alloc.c Tue Mar 21 16:29:32 2000
+++ mm/page_alloc.c Tue Mar 21 18:24:15 2000
@@ -235,19 +235,16 @@
zone_t *z = *(zone++);
if (!z)
break;
- if (z->free_pages > z->pages_low)
- continue;
-
- z->zone_wake_kswapd = 1;
- wake_up_interruptible(&kswapd_wait);
/* Are we reaching the critical stage? */
- if (!z->low_on_memory) {
- /* Not yet critical, so let kswapd handle it.. */
- if (z->free_pages > z->pages_min)
- continue;
+ if (z->free_pages <= z->pages_min)
z->low_on_memory = 1;
+ if (z->free_pages <= z->pages_low) {
+ z->zone_wake_kswapd = 1;
+ wake_up_interruptible(&kswapd_wait);
}
+ if (!z->low_on_memory)
+ continue;
/*
* In the atomic allocation case we only 'kick' the
* state machine, but do not try to free pages
@@ -293,7 +290,7 @@
BUG();
/* Are we supposed to free memory? Don't make it worse.. */
- if (!z->zone_wake_kswapd && z->free_pages > z->pages_low) {
+ if (!z->low_on_memory && z->free_pages > z->pages_min) {
struct page *page = rmqueue(z, order);
if (page)
return page;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next reply other threads:[~2000-03-27 8:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-27 8:03 Kanoj Sarcar [this message]
2000-03-27 12:56 ` Mark Hahn
2000-03-27 15:50 ` Rik van Riel
2000-03-27 17:33 ` Christoph Rohland
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=200003270803.AAA14950@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
/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