linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFT] balancing patch
@ 2000-03-27  8:03 Kanoj Sarcar
  2000-03-27 12:56 ` Mark Hahn
  2000-03-27 17:33 ` Christoph Rohland
  0 siblings, 2 replies; 4+ messages in thread
From: Kanoj Sarcar @ 2000-03-27  8:03 UTC (permalink / raw)
  To: linux-mm, linux-kernel

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFT] balancing patch
  2000-03-27  8:03 [RFT] balancing patch Kanoj Sarcar
@ 2000-03-27 12:56 ` Mark Hahn
  2000-03-27 15:50   ` Rik van Riel
  2000-03-27 17:33 ` Christoph Rohland
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Hahn @ 2000-03-27 12:56 UTC (permalink / raw)
  To: Kanoj Sarcar; +Cc: linux-mm, linux-kernel

> see whether it helps them. If you try the patch, and see that it
> helps, or hinders, your system performance, please let me know. 

doesn't help: kswapd still wastes major CPU.

--
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] 4+ messages in thread

* Re: [RFT] balancing patch
  2000-03-27 12:56 ` Mark Hahn
@ 2000-03-27 15:50   ` Rik van Riel
  0 siblings, 0 replies; 4+ messages in thread
From: Rik van Riel @ 2000-03-27 15:50 UTC (permalink / raw)
  To: Mark Hahn; +Cc: Kanoj Sarcar, linux-mm, linux-kernel

On Mon, 27 Mar 2000, Mark Hahn wrote:

> > see whether it helps them. If you try the patch, and see that it
> > helps, or hinders, your system performance, please let me know. 
> 
> doesn't help: kswapd still wastes major CPU.

I'm now testing Kanoj' balancing patch together with my kswapd
infinite-loop-removal patch. The system seems to work quite well,
I haven't seen any big strangeness in the VM load (the variance
in the amount of free memory is a bit bigger, naturally, but that's
to be expected) and interactive performance from the console seems
unaffected.

It would be nice if a few more people tested the combination of
2.3.99-pre3 with Kanoj' balancing patch and my infinite-loop-
removal patch ...   (because YMMV)

regards,

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

Wanna talk about the kernel?  irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/		http://www.surriel.com/

--
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] 4+ messages in thread

* Re: [RFT] balancing patch
  2000-03-27  8:03 [RFT] balancing patch Kanoj Sarcar
  2000-03-27 12:56 ` Mark Hahn
@ 2000-03-27 17:33 ` Christoph Rohland
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Rohland @ 2000-03-27 17:33 UTC (permalink / raw)
  To: Kanoj Sarcar; +Cc: linux-mm, linux-kernel

kanoj@google.engr.sgi.com (Kanoj Sarcar) writes:

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

I did not see degraded performance but tested it anyway with my shm
stress tests.

2.3.99-pre3 is the first release which handles 11.5GB shared mem
trashing on my 8GB machine without choking.

But adding your patch leads again to random process killed and other
oom situations when it has to go into swap.

Greetings
		Christoph

-- 
--
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] 4+ messages in thread

end of thread, other threads:[~2000-03-27 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-27  8:03 [RFT] balancing patch Kanoj Sarcar
2000-03-27 12:56 ` Mark Hahn
2000-03-27 15:50   ` Rik van Riel
2000-03-27 17:33 ` Christoph Rohland

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