]> git.baikalelectronics.ru Git - kernel.git/commit
fs: inode: count invalidated shadow pages in pginodesteal
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 2 Sep 2021 21:53:24 +0000 (14:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Sep 2021 16:58:10 +0000 (09:58 -0700)
commit4d7c345b8e8b301fd0d980b6ebe13afcc98dd448
tree3e81f69167458f191854eeb7c87a5310972668c7
parenta2bf999b997d6a5c5296e8e6a3b73ba016b8e51e
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: Linus Torvalds <torvalds@linux-foundation.org>
fs/inode.c
mm/truncate.c