[PATCH] goeasy without typo :)

From: Rik van Riel (riel@nl.linux.org)
Date: Sat Jan 22 2000 - 21:37:05 EST


Hi Alan, Andrea,

IBM's James Manning pointed out two forgotten braces
in my last patchlet, so here is a new version (one that
should work). Like the last one it slows down kswapd
once it gets above freepages.low .. because it frees
memory with SWAP_CLUSTER_MAX pages at a time, this won't
give any hysteresis problems.

Between freepages.low and freepages.high kswapd will
do background freeing of pages. When the CPU is idle
it will work until it has reached freepages.high,
otherwise it'll yield the CPU and try again later.

regards,

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

--- mm/vmscan.c.combo Sun Jan 23 01:06:50 2000 +++ mm/vmscan.c Sun Jan 23 03:30:46 2000 @@ -497,8 +497,11 @@ { if (!do_try_to_free_pages(GFP_KSWAPD)) break; - if (tsk->need_resched) + if (tsk->need_resched) { + if (nr_free_pages > freepages.low) + break; schedule(); + } } run_task_queue(&tq_disk); interruptible_sleep_on_timeout(&kswapd_wait, HZ);

- 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/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:28 EST