diff options
author | zhongjiang <zhongjiang@huawei.com> | 2017-06-16 14:02:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-06-17 06:37:05 +0900 |
commit | d7143e31259cb029e207619209b31aa7520f8e28 (patch) | |
tree | cb5b5117641013f879eb5d0794ece76533d65e72 | |
parent | 64c2b20301f62c697352c8028c569b1b2bdd8e82 (diff) | |
download | linux-d7143e31259cb029e207619209b31aa7520f8e28.tar.gz linux-d7143e31259cb029e207619209b31aa7520f8e28.tar.bz2 linux-d7143e31259cb029e207619209b31aa7520f8e28.zip |
mm: correct the comment when reclaimed pages exceed the scanned pages
Commit e1587a494540 ("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.com
Signed-off-by: zhongjiang <zhongjiang@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/vmpressure.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 6063581f705c..ce0618bfa8d0 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c @@ -115,9 +115,9 @@ static enum vmpressure_levels vmpressure_calc_level(unsigned long scanned, unsigned long pressure = 0; /* - * reclaimed can be greater than scanned in cases - * like THP, where the scanned is 1 and reclaimed - * could be 512 + * reclaimed can be greater than scanned for things such as reclaimed + * slab pages. shrink_node() just adds reclaimed pages without a + * related increment to scanned pages. */ if (reclaimed >= scanned) goto out; |