Skip to content

Commit d37dd5d

Browse files
Fengguang Wutorvalds
authored andcommitted
vmscan: comment too_many_isolated()
Comment "Why it's doing so" rather than "What it does" as proposed by Andrew Morton. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent dc05373 commit d37dd5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mm/vmscan.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,11 @@ int isolate_lru_page(struct page *page)
11771177
}
11781178

11791179
/*
1180-
* Are there way too many processes in the direct reclaim path already?
1180+
* A direct reclaimer may isolate SWAP_CLUSTER_MAX pages from the LRU list and
1181+
* then get resheduled. When there are massive number of tasks doing page
1182+
* allocation, such sleeping direct reclaimers may keep piling up on each CPU,
1183+
* the LRU list will go small and be scanned faster than necessary, leading to
1184+
* unnecessary swapping, thrashing and OOM.
11811185
*/
11821186
static int too_many_isolated(struct zone *zone, int file,
11831187
struct scan_control *sc)

0 commit comments

Comments
 (0)