lkml.org 
[lkml]   [2000]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2.4.0-test4 kswapd rebalancing fix
Hi,

the attached patch should fix the following things in
2.4.0-test4:
- kswapd keeping too much memory free
- bad performance in some cases because kswapd doesn't
have the ability to properly balance between zones

(this patch was created in 1 minute in response to a complaint
from some people on #kernelnewbies, I'm working on the new VM
myself and won't take any time to defend or talk about this patch
if it turns out people for some reason don't like it)

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
-- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/ http://www.surriel.com/



--- linux-2.4.0-test4/mm/vmscan.c.orig Sat Jul 15 14:48:38 2000
+++ linux-2.4.0-test4/mm/vmscan.c Sat Jul 15 14:49:49 2000
@@ -440,27 +440,6 @@
}

/*
- * Check if there recently has been memory pressure (zone_wake_kswapd)
- */
-static inline int keep_kswapd_awake(void)
-{
- pg_data_t *pgdat = pgdat_list;
-
- do {
- int i;
- for(i = 0; i < MAX_NR_ZONES; i++) {
- zone_t *zone = pgdat->node_zones+ i;
- if (zone->size &&
- zone->zone_wake_kswapd)
- return 1;
- }
- pgdat = pgdat->node_next;
- } while (pgdat);
-
- return 0;
-}
-
-/*
* We need to make the locks finer granularity, but right
* now we need this so that we can do page allocations
* without holding the kernel lock etc.
@@ -595,7 +574,7 @@
tsk->flags |= PF_MEMALLOC;

for (;;) {
- if (!keep_kswapd_awake()) {
+ if (!memory_pressure()) {
/* wake up regulary to do an early attempt too free
* pages - pages will not actually be freed.
*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.041 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site