[PATCH 2/3] mm: cond_resched in scan_mapping_unevictable_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



scan_mapping_unevictable_pages() is used to make SysV SHM_LOCKed pages
evictable again once the shared memory is unlocked or destroyed (the
latter seems rather a waste of time, but meets internal expectations).
It does pagevec_lookup()s across the whole object: methinks a
cond_resched() every PAGEVEC_SIZE pages would be worthwhile.

Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
---
 mm/vmscan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- mmotm.orig/mm/vmscan.c	2011-12-28 16:49:36.000000000 -0800
+++ mmotm/mm/vmscan.c	2011-12-28 17:03:07.647220248 -0800
@@ -3583,8 +3583,8 @@ void scan_mapping_unevictable_pages(stru
 		pagevec_release(&pvec);
 
 		count_vm_events(UNEVICTABLE_PGSCANNED, pg_scanned);
+		cond_resched();
 	}
-
 }
 
 static void warn_scan_unevictable_pages(void)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]