linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch] care about the age of the pte even if we are low on memory
@ 1999-08-08 18:38 Andrea Arcangeli
  1999-08-09 10:42 ` Neil Conway
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Arcangeli @ 1999-08-08 18:38 UTC (permalink / raw)
  To: Linus Torvalds, MOLNAR Ingo, Stephen C. Tweedie; +Cc: linux-mm

I don't know why in the 2.3.x we are swapping out even the young pages.
This is not going to help oom handling at all and it's only reducing of an
order of magnitude the interactive feeling under heavy swapout. I can
notice an huge difference with eyes from clean 2.2.10 to 2.3.13-pre8.

The low_on_memory flag is there only for GFP internals and IMO it
shouldn't be ever looked from other places.

This patch against 2.3.13-pre8 will fix the problem and it will avoid
further mistakes.

diff -urN 2.3.13-pre8/include/linux/mm.h 2.3.13-pre8-low_on_memory/include/linux/mm.h
--- 2.3.13-pre8/include/linux/mm.h	Wed Aug  4 12:28:17 1999
+++ 2.3.13-pre8-low_on_memory/include/linux/mm.h	Sun Aug  8 20:25:58 1999
@@ -292,8 +292,6 @@
 	return page;
 }
 
-extern int low_on_memory;
-
 /* memory.c & swap.c*/
 
 #define free_page(addr) free_pages((addr),0)
diff -urN 2.3.13-pre8/mm/page_alloc.c 2.3.13-pre8-low_on_memory/mm/page_alloc.c
--- 2.3.13-pre8/mm/page_alloc.c	Tue Jul 13 02:02:40 1999
+++ 2.3.13-pre8-low_on_memory/mm/page_alloc.c	Sun Aug  8 20:24:03 1999
@@ -194,8 +194,6 @@
 	set_page_count(map, 1); \
 } while (0)
 
-int low_on_memory = 0;
-
 unsigned long __get_free_pages(int gfp_mask, unsigned long order)
 {
 	unsigned long flags;
@@ -221,6 +219,7 @@
 	 */
 	if (!(current->flags & PF_MEMALLOC)) {
 		int freed;
+		static int low_on_memory = 0;
 
 		if (nr_free_pages > freepages.min) {
 			if (!low_on_memory)
diff -urN 2.3.13-pre8/mm/vmscan.c 2.3.13-pre8-low_on_memory/mm/vmscan.c
--- 2.3.13-pre8/mm/vmscan.c	Sun Aug  8 17:21:41 1999
+++ 2.3.13-pre8-low_on_memory/mm/vmscan.c	Sun Aug  8 20:23:19 1999
@@ -54,7 +54,7 @@
 	 * Dont be too eager to get aging right if
 	 * memory is dangerously low.
 	 */
-	if (!low_on_memory && pte_young(pte)) {
+	if (pte_young(pte)) {
 		/*
 		 * Transfer the "accessed" bit from the page
 		 * tables to the global page map.

Andrea

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

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

end of thread, other threads:[~1999-08-17  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-08 18:38 [patch] care about the age of the pte even if we are low on memory Andrea Arcangeli
1999-08-09 10:42 ` Neil Conway
1999-08-09 10:46   ` Andrea Arcangeli
1999-08-17  0:29     ` Andrea Arcangeli

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