]> Git Repo - linux.git/commit - mm/mlock.c
mlock: fix unevictable_pgs event counts on THP
authorHugh Dickins <[email protected]>
Sat, 19 Sep 2020 04:20:15 +0000 (21:20 -0700)
committerLinus Torvalds <[email protected]>
Sat, 19 Sep 2020 20:13:38 +0000 (13:13 -0700)
commit0964730bf46b4e271c5ecad5badbbd95737c087b
tree69eb50b9151ae33e8104fdb4b95ba3a054f5417c
parent8d8869ca5d2d9d86db96271ab063fdcfa9baf5b4
mlock: fix unevictable_pgs event counts on THP

5.8 commit 5d91f31faf8e ("mm: swap: fix vmstats for huge page") has
established that vm_events should count every subpage of a THP, including
unevictable_pgs_culled and unevictable_pgs_rescued; but
lru_cache_add_inactive_or_unevictable() was not doing so for
unevictable_pgs_mlocked, and mm/mlock.c was not doing so for
unevictable_pgs mlocked, munlocked, cleared and stranded.

Fix them; but THPs don't go the pagevec way in mlock.c, so no fixes needed
on that path.

Fixes: 5d91f31faf8e ("mm: swap: fix vmstats for huge page")
Signed-off-by: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Acked-by: Yang Shi <[email protected]>
Cc: Alex Shi <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Qian Cai <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
mm/mlock.c
mm/swap.c
This page took 0.049429 seconds and 4 git commands to generate.