linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* PATCH: Improvement in shrink_mmap
@ 2000-06-14 22:19 Juan J. Quintela
  2000-06-15  0:18 ` PATCH: Improvement in shrink_mmap (take 2) Juan J. Quintela
  0 siblings, 1 reply; 2+ messages in thread
From: Juan J. Quintela @ 2000-06-14 22:19 UTC (permalink / raw)
  To: ac, Alan Cox, Dave Jones, Rik van Riel, linux-mm, lkml

Hi
        The actual code in shrink mmap waits for all the pages after
        we pass priority pages.  The idea is to wait only each
        priority pages.  I have had such a patch for a while here, it
        appears to work here.  I send it to Linus in the middle of a
        bigger patch that was not accepted and I forgot to send only
        this two-liner.

Later, Juan.

diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude ac18/mm/filemap.c prueba/mm/filemap.c
--- ac18/mm/filemap.c	Tue Jun 13 23:18:35 2000
+++ prueba/mm/filemap.c	Thu Jun 15 00:18:33 2000
@@ -351,7 +351,9 @@
 		 * of zone - it's old.
 		 */
 		if (page->buffers) {
-			int wait = ((gfp_mask & __GFP_IO) && (nr_dirty-- < 0));
+			int wait = ((gfp_mask & __GFP_IO) && (nr_dirty-- <= 0));
+			if(nr_dirty < 0)
+				nr_dirty = priority;
 			if (!try_to_free_buffers(page, wait))
 				goto unlock_continue;
 			/* page was locked, inode can't go away under us */


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
--
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] 2+ messages in thread

* Re: PATCH: Improvement in shrink_mmap (take 2)
  2000-06-14 22:19 PATCH: Improvement in shrink_mmap Juan J. Quintela
@ 2000-06-15  0:18 ` Juan J. Quintela
  0 siblings, 0 replies; 2+ messages in thread
From: Juan J. Quintela @ 2000-06-15  0:18 UTC (permalink / raw)
  To: ac; +Cc: Alan Cox, Dave Jones, Rik van Riel, linux-mm, lkml

Hi

        James Manning told me that this test is easier to optimize
        (global result is the same).

Later, Juan.
        

diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude ac18/mm/filemap.c prueba/mm/filemap.c
--- ac18/mm/filemap.c	Thu Jun 15 00:28:22 2000
+++ prueba/mm/filemap.c	Thu Jun 15 02:14:59 2000
@@ -351,7 +351,9 @@
 		 * of zone - it's old.
 		 */
 		if (page->buffers) {
-			int wait = ((gfp_mask & __GFP_IO) && (nr_dirty-- < 0));
+			int wait = ((gfp_mask & __GFP_IO) && (--nr_dirty < 0));
+			if(nr_dirty < 0)
+				nr_dirty = priority;
 			if (!try_to_free_buffers(page, wait))
 				goto unlock_continue;
 			/* page was locked, inode can't go away under us */


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
--
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] 2+ messages in thread

end of thread, other threads:[~2000-06-15  0:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-14 22:19 PATCH: Improvement in shrink_mmap Juan J. Quintela
2000-06-15  0:18 ` PATCH: Improvement in shrink_mmap (take 2) Juan J. Quintela

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