[patch] mm: unlockless reclaim
From: Nick Piggin <hidden>
Date: 2007-11-11 08:40:27
Also in:
lkml
Combined with the previous and subsequent patches, throughput of pages through the pagecache on an Opteron system here goes up by anywhere from 50% to 500%, depending on the number of files and threads involved. -- unlock_page is fairly expensive. It can be avoided in page reclaim. Signed-off-by: Nick Piggin <redacted> --- Index: linux-2.6/mm/vmscan.c ===================================================================
--- linux-2.6.orig/mm/vmscan.c
+++ linux-2.6/mm/vmscan.c@@ -589,7 +589,14 @@ static unsigned long shrink_page_list(st goto keep_locked; free_it: - unlock_page(page); + /* + * At this point, we have no other references and there is + * no way to pick any more up (removed from LRU, removed + * from pagecache). Can use non-atomic bitops now (and + * we obviously don't have to worry about waking up a process + * waiting on the page lock, because there are no references. + */ + __clear_page_locked(page); nr_reclaimed++; if (!pagevec_add(&freed_pvec, page)) __pagevec_release_nonlru(&freed_pvec); --
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-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>