]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: vmscan: refactor updating reclaimed pages in reclaim_state
authorYosry Ahmed <yosryahmed@google.com>
Tue, 4 Apr 2023 00:13:52 +0000 (00:13 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:54 +0000 (16:02 -0700)
commit2eade99eb98dd6591fd1c7661be65905cc50efae
tree61720f805fb17707ac9000dd3705ab3413302329
parentb7ff0f629df76aac132ea408349b97f5d4d93a4e
mm: vmscan: refactor updating reclaimed pages in reclaim_state

During reclaim, we keep track of pages reclaimed from other means than
LRU-based reclaim through scan_control->reclaim_state->reclaimed_slab,
which we stash a pointer to in current task_struct.

However, we keep track of more than just reclaimed slab pages through
this.  We also use it for clean file pages dropped through pruned inodes,
and xfs buffer pages freed.  Rename reclaimed_slab to reclaimed, and add a
helper function that wraps updating it through current, so that future
changes to this logic are contained within mm/vmscan.c.

Link: https://lkml.kernel.org/r/20230404001353.468224-3-yosryahmed@google.com
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: NeilBrown <neilb@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/inode.c
fs/xfs/xfs_buf.c
include/linux/swap.h
mm/slab.c
mm/slob.c
mm/slub.c
mm/vmscan.c