linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* shrink_mmap() change in ac-21
@ 2000-06-19 20:14 Zlatko Calusic
  2000-06-19 21:07 ` Rik van Riel
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Zlatko Calusic @ 2000-06-19 20:14 UTC (permalink / raw)
  To: alan; +Cc: linux-mm, linux-kernel

Hi, Alan and others!

The shrink_mmap() change in your latest prepatch (ac12) doesn't look
very healthy. Removing the test for the wrong zone we effectively
discard lots of wrong pages before we get to the right one. That is
effectively flushing the page cache and we have unbalanced system.

For example, check the "vmstat 1" output below, done while I was
reading a big file from the disk. At some point in time, the page
cache shrunk to almost half of its size (75MB -> 42MB).

The reason is balancing of the DMA zone (which is much smaller on a
128MB machine than the NORMAL zone!). shrink_mmap() now happily evicts
wrong pages from the memory and continues doing so until it finally
frees enough pages from the DMA zone. That, of course, hurts caching
as the page cache gets shrunk a lot without a good reason.


   procs                      memory    swap          io     system         cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
 0  1  0    988   5556    172  78708   0   0  3811     0  342   859   0   6  93
 0  1  0   1040   9712    176  74640   0 168  3043    42  309   801   0   6  93
 0  1  0   1084   7272    184  76800   0 408  2659   102  317   762   0   7  93
 0  1  0   1084   8704__  212  75308   0   0  2730     0  285   782   0   7  93
 3  0  0   1084  42400  \ 192  42780   0   0  2447     0  270   703   0   8  91
 0  1  0   1084  30092  | 204  54684   0   0  2979     0  299   767   1   4  95
                         \
                           here! :)

The incriminating change is:


Index: 24001.28/mm/filemap.c
--- 24001.28/mm/filemap.c Wed, 14 Jun 2000 01:44:09 +0200 zcalusic (linux/F/b/16_filemap.c 1.6.1.3.2.4.1.1.2.2.2.1.1.21.1.1.3.2.3.1.4.1 644)
+++ 24001.31(w)/mm/filemap.c Sun, 18 Jun 2000 21:23:47 +0200 zcalusic (linux/F/b/16_filemap.c 1.6.1.3.2.4.1.1.2.2.2.1.1.21.1.1.3.2.3.1.4.2 644)
@@ -361,16 +361,6 @@
 			}
 		}
 
-		/*
-		 * Page is from a zone we don't care about.
-		 * Don't drop page cache entries in vain.
-		 */
-		if (page->zone->free_pages > page->zone->pages_high) {
-			/* the page from the wrong zone doesn't count */
-			count++;
-			goto unlock_continue;
-		}
-
 		/* Take the pagecache_lock spinlock held to avoid
 		   other tasks to notice the page while we are looking at its
 		   page count. If it's a pagecache-page we'll free it

Regards,
-- 
Zlatko
--
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] 18+ messages in thread
[parent not found: <200006202027.NAA01142@penguin.transmeta.com>]

end of thread, other threads:[~2000-06-20 22:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-19 20:14 shrink_mmap() change in ac-21 Zlatko Calusic
2000-06-19 21:07 ` Rik van Riel
2000-06-19 21:46 ` Jamie Lokier
2000-06-19 22:10   ` Rik van Riel
2000-06-19 22:43     ` Andrea Arcangeli
2000-06-19 22:48   ` Andrea Arcangeli
2000-06-20  9:03     ` Zlatko Calusic
2000-06-20 16:18     ` Rik van Riel
2000-06-20 16:53       ` Juan J. Quintela
2000-06-20 17:30         ` Manfred Spraul, Juan J. Quintela
2000-06-20 17:41           ` Juan J. Quintela
2000-06-20 19:00             ` Andrea Arcangeli
2000-06-19 21:47 ` Manfred Spraul, Zlatko Calusic
2000-06-20  8:21   ` Zlatko Calusic
2000-06-20 16:14     ` Manfred Spraul, Zlatko Calusic
2000-06-20 17:01       ` willy
2000-06-20 17:03         ` Alan Cox
     [not found] <200006202027.NAA01142@penguin.transmeta.com>
2000-06-20 22:59 ` 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