lkml.org 
[lkml]   [2004]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: kswapd in tight loop 2.6.9-rc3-bk-recent


Andrew Morton wrote:

>Chris Wright <chrisw@osdl.org> wrote:
>
>>(whereas I could get the mainline code, and the
>> one-liner to spin right off).
>>
>
>How? (up to and including .config please).
>
>
>

Ah, free_pages <= pages_high, ie. 0 <= 0, which is true;
commence spinning.

How's this go?




Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>


---

linux-2.6-npiggin/mm/vmscan.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN mm/vmscan.c~vm-fix-empty-zones mm/vmscan.c
--- linux-2.6/mm/vmscan.c~vm-fix-empty-zones 2004-10-08 12:44:14.000000000 +1000
+++ linux-2.6-npiggin/mm/vmscan.c 2004-10-08 12:44:48.000000000 +1000
@@ -1003,7 +1003,7 @@ static int balance_pgdat(pg_data_t *pgda
priority != DEF_PRIORITY)
continue;

- if (zone->free_pages <= zone->pages_high) {
+ if (zone->free_pages < zone->pages_high) {
end_zone = i;
goto scan;
}
@@ -1035,7 +1035,7 @@ scan:
continue;

if (nr_pages == 0) { /* Not software suspend */
- if (zone->free_pages <= zone->pages_high)
+ if (zone->free_pages < zone->pages_high)
all_zones_ok = 0;
}
zone->temp_priority = priority;
@@ -1142,7 +1142,7 @@ static int kswapd(void *p)
*/
void wakeup_kswapd(struct zone *zone)
{
- if (zone->free_pages > zone->pages_low)
+ if (zone->free_pages >= zone->pages_low)
return;
if (!waitqueue_active(&zone->zone_pgdat->kswapd_wait))
return;
_
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.077 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site