[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [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, 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/