linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kswapd less agressive
@ 2000-01-23  0:39 Rik van Riel
  0 siblings, 0 replies; only message in thread
From: Rik van Riel @ 2000-01-23  0:39 UTC (permalink / raw)
  To: Alan Cox; +Cc: Andrea Arcangeli, Linux MM, Linux Kernel

Hi Alan, Andrea,

a few people (hi Andrea :)) have commented that kswapd
is somewhat too agressive in 2.2.15pre4. This patch
should fix that (but don't integrate it yet, I have not
tested it yet).

Basically kswapd used to agressively free pages until
it had reached freepages.high. Now kswapd will only
free pages agressively up to freepages.low, above that
it will pause if it finds it's ->need_resched set.
(which should bring us back to freeing in the background)

Everyone interested: please test 2.2.15pre4 with and
without this test and tell us your results, thank you.

regards,

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


--- vmscan.c.combo	Sun Jan 23 01:06:50 2000
+++ vmscan.c	Sun Jan 23 01:06:01 2000
@@ -498,6 +498,8 @@
 			if (!do_try_to_free_pages(GFP_KSWAPD))
 				break;
 			if (tsk->need_resched)
+				if (nr_free_pages > freepages.low)
+					break;
 				schedule();
 		}
 		run_task_queue(&tq_disk);

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-01-23  0:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-23  0:39 [PATCH] kswapd less agressive Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox