]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs: inode: count invalidated shadow pages in pginodesteal
authorJohannes Weiner <hannes@cmpxchg.org>
Mon, 23 Aug 2021 23:59:08 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:41 +0000 (09:33 +1000)
commit006057f1bcfd89ac9655e8547427c5c3fd887f20
treedfb2053df7f61b7e4a34654b2f13ec9c289862ed
parent2e0fb5261bcfc236de8d828512d7d4c04fa89779
fs: inode: count invalidated shadow pages in pginodesteal

pginodesteal is supposed to capture the impact that inode reclaim has on
the page cache state.  Currently, it doesn't consider shadow pages that
get dropped this way, even though this can have a significant impact on
paging behavior, memory pressure calculations etc.

To improve visibility into these effects, make sure shadow pages get
counted when they get dropped through inode reclaim.

This changes the return value semantics of invalidate_mapping_pages()
semantics slightly, but the only two users are the inode shrinker itsel
and a usb driver that logs it for debugging purposes.

Link: https://lkml.kernel.org/r/20210614211904.14420-3-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
fs/inode.c
mm/truncate.c