lkml.org 
[lkml]   [2001]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH *] 2.4.0 VM improvements


On Sun, 7 Jan 2001, Rik van Riel wrote:

> The patch is available at this URL:
>
> http://www.surriel.com/patches/2.4/2.4.0-tunevm+rss

I have one improvement on top of your patch.

Now its not more "rare" (as the comment on the code stated) to have
pages with page->age == 0 being called on lru_cache_add.

This patch should make the overhead of calling lru_cache_add on pages with
page->age == 0 smaller.

--- mm/swap.c.orig Sun Jan 7 15:59:37 2001
+++ mm/swap.c Sun Jan 7 16:11:21 2001
@@ -233,10 +233,12 @@
if (!PageLocked(page))
BUG();
DEBUG_ADD_PAGE
- add_page_to_active_list(page);
- /* This should be relatively rare */
- if (!page->age)
- deactivate_page_nolock(page);
+
+ if (page->age)
+ add_page_to_active_list(page);
+ else
+ add_page_to_inactive_dirty_list(page);
+
spin_unlock(&pagemap_lru_lock);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.044 / U:62.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site