linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch] pre9-2 shm balance
@ 2000-05-18  2:32 Rik van Riel
  0 siblings, 0 replies; only message in thread
From: Rik van Riel @ 2000-05-18  2:32 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-mm

Hi Linus,

with quintela's latest patch and the small patch below, the
system works fine again, even under heavy shm stress testing.

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/


--- ipc/shm.c.orig	Wed May 17 22:59:47 2000
+++ ipc/shm.c	Wed May 17 23:24:52 2000
@@ -1468,7 +1468,7 @@
 }
 
 /*
- * Goes through counter = (shm_rss >> prio) present shm pages.
+ * Goes through counter = (shm_rss / (prio + 1)) present shm pages.
  */
 static unsigned long swap_id; /* currently being swapped */
 static unsigned long swap_idx; /* next to swap */
@@ -1483,7 +1483,7 @@
 	struct page * page_map;
 
 	zshm_swap(prio, gfp_mask);
-	counter = shm_rss >> prio;
+	counter = shm_rss / (prio + 1);
 	if (!counter)
 		return 0;
 	if (shm_swap_preop(&swap_entry))
@@ -1809,7 +1809,7 @@
 	int counter;
 	struct page * page_map;
 
-	counter = zshm_rss >> prio;
+	counter = zshm_rss / (prio + 1);
 	if (!counter)
 		return;
 next:

--
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-05-18  2:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-18  2:32 [patch] pre9-2 shm balance 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