vmscan: protect zone rotation stats by lru lock
Subsystems (3)
Signed-off-by Johannes Weiner <[email protected]>
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
@@ -1243,32 +1243,32 @@ static void shrink_active_list(unsigned/* page_referenced clears PageReferenced */ if (page_mapping_inuse (page) &&page_referenced (page,0 , sc->mem_cgroup)) pgmoved++;list_add (&page->lru, &l_inactive); } +spin_lock_irq (&zone->lru_lock);/* * Count referenced pages from currently used mappings as * rotated, even though they are moved to the inactive list. * This helps balance scan pressure between file and anonymous * pages in get_scan_ratio. */ zone->recent_rotated[!!file] += pgmoved;/* * Move the pages to the [file or anon] inactive list. */ pagevec_init (&pvec,1 ); pgmoved =0 ; lru =LRU_BASE + file *LRU_FILE ; -spin_lock_irq (&zone->lru_lock);while (!list_empty (&l_inactive)) { page =lru_to_page (&l_inactive);prefetchw_prev_lru_page (page, &l_inactive, flags);VM_BUG_ON (PageLRU (page));SetPageLRU (page);VM_BUG_ON (!PageActive (page));ClearPageActive (page);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Rik van Riel
Acked-byQuoted 1 line · Johannes Weiner
Signed-off-by Johannes Weiner <[email protected]>
That wants a commit message. Otherwise,
Acked-by Rik van Riel <[email protected]>
Signature · 7 lines
All rights reversed. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
KOSAKI Motohiro
Reviewed-byQuoted 9 lines
mm/vmscan.c +1
-0+spin_lock_irq (&zone->lru_lock);/* * Count referenced pages from currently used mappings as * rotated, even though they are moved to the inactive list. * This helps balance scan pressure between file and anonymous * pages in get_scan_ratio. */ zone->recent_rotated[!!file] += pgmoved;
mm/vmscan.c static void shrink_active_list(unsigned · line 1268
Quoted 10 lines
mm/vmscan.c +0
-1/* * Move the pages to the [file or anon] inactive list. */ pagevec_init (&pvec,1 ); pgmoved =0 ; lru =LRU_BASE + file *LRU_FILE ; -spin_lock_irq (&zone->lru_lock);while (!list_empty (&l_inactive)) { page =lru_to_page (&l_inactive);
I think this patch is needed for 2.6.28.
please CC to lkml and linus at your next post.
Reviewed-by KOSAKI Motohiro <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>