Commit b2cb6826 authored by Miaohe Lin's avatar Miaohe Lin Committed by akpm

mm/vmscan: fix comment for isolate_lru_pages

Since commit 791b48b6 ("mm: vmscan: scan until it finds eligible
pages"), splicing any skipped pages to the tail of the LRU list won't put
the system at risk of premature OOM but will waste lots of cpu cycles. 
Correct the comment accordingly.

Link: https://lkml.kernel.org/r/20220416025231.8082-1-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 5829f7db
...@@ -2117,8 +2117,8 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan, ...@@ -2117,8 +2117,8 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
* Splice any skipped pages to the start of the LRU list. Note that * Splice any skipped pages to the start of the LRU list. Note that
* this disrupts the LRU order when reclaiming for lower zones but * this disrupts the LRU order when reclaiming for lower zones but
* we cannot splice to the tail. If we did then the SWAP_CLUSTER_MAX * we cannot splice to the tail. If we did then the SWAP_CLUSTER_MAX
* scanning would soon rescan the same pages to skip and put the * scanning would soon rescan the same pages to skip and waste lots
* system at risk of premature OOM. * of cpu cycles.
*/ */
if (!list_empty(&pages_skipped)) { if (!list_empty(&pages_skipped)) {
int zid; int zid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment