提交 d7143e31 编写于 作者: Z zhongjiang 提交者: Linus Torvalds

mm: correct the comment when reclaimed pages exceed the scanned pages

Commit e1587a49 ("mm: vmpressure: fix sending wrong events on
underflow") declared that reclaimed pages exceed the scanned pages due
to the thp reclaim.

That is incorrect because THP will be spilt to normal page and loop
again, which will result in the scanned pages increment.

[akpm@linux-foundation.org: tweak comment text]
Link: http://lkml.kernel.org/r/1496824266-25235-1-git-send-email-zhongjiang@huawei.comSigned-off-by: Nzhongjiang <zhongjiang@huawei.com>
Acked-by: NMinchan Kim <minchan@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 64c2b203
...@@ -115,9 +115,9 @@ static enum vmpressure_levels vmpressure_calc_level(unsigned long scanned, ...@@ -115,9 +115,9 @@ static enum vmpressure_levels vmpressure_calc_level(unsigned long scanned,
unsigned long pressure = 0; unsigned long pressure = 0;
/* /*
* reclaimed can be greater than scanned in cases * reclaimed can be greater than scanned for things such as reclaimed
* like THP, where the scanned is 1 and reclaimed * slab pages. shrink_node() just adds reclaimed pages without a
* could be 512 * related increment to scanned pages.
*/ */
if (reclaimed >= scanned) if (reclaimed >= scanned)
goto out; goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册