Skip to content

Commit 96f7b2b

Browse files
Qi Zhengakpm00
authored andcommitted
mm: vmscan: move shrinker-related code into a separate file
The mm/vmscan.c file is too large, so separate the shrinker-related code from it into a separate file. No functional changes. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Qi Zheng <[email protected]> Reviewed-by: Muchun Song <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Christian König <[email protected]> Cc: Chuck Lever <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Darrick J. Wong <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Joel Fernandes <[email protected]> Cc: Kirill Tkhai <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Roman Gushchin <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Steven Price <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Abhinav Kumar <[email protected]> Cc: Alasdair Kergon <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Alyssa Rosenzweig <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Andreas Gruenbacher <[email protected]> Cc: Anna Schumaker <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Bob Peterson <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Carlos Llamas <[email protected]> Cc: Chandan Babu R <[email protected]> Cc: Chao Yu <[email protected]> Cc: Chris Mason <[email protected]> Cc: Coly Li <[email protected]> Cc: Dai Ngo <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Airlie <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: David Sterba <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Gao Xiang <[email protected]> Cc: Huang Rui <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jaegeuk Kim <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Jan Kara <[email protected]> Cc: Jason Wang <[email protected]> Cc: Jeff Layton <[email protected]> Cc: Jeffle Xu <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Josef Bacik <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: Marijn Suijten <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Mike Snitzer <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Muchun Song <[email protected]> Cc: Nadav Amit <[email protected]> Cc: Neil Brown <[email protected]> Cc: Oleksandr Tyshchenko <[email protected]> Cc: Olga Kornievskaia <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Rob Clark <[email protected]> Cc: Rob Herring <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Sean Paul <[email protected]> Cc: Song Liu <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tomeu Vizoso <[email protected]> Cc: Tom Talpey <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: Xuan Zhuo <[email protected]> Cc: Yue Hu <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 3ee0aa9 commit 96f7b2b

File tree

4 files changed

+713
-703
lines changed

4 files changed

+713
-703
lines changed

mm/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ endif
4848

4949
obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
5050
maccess.o page-writeback.o folio-compat.o \
51-
readahead.o swap.o truncate.o vmscan.o shmem.o \
52-
util.o mmzone.o vmstat.o backing-dev.o \
51+
readahead.o swap.o truncate.o vmscan.o shrinker.o \
52+
shmem.o util.o mmzone.o vmstat.o backing-dev.o \
5353
mm_init.o percpu.o slab_common.o \
5454
compaction.o show_mem.o shmem_quota.o\
5555
interval_tree.o list_lru.o workingset.o \

mm/internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,8 @@ struct vma_prepare {
11561156
};
11571157

11581158
/* shrinker related functions */
1159+
unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg,
1160+
int priority);
11591161

11601162
#ifdef CONFIG_SHRINKER_DEBUG
11611163
extern int shrinker_debugfs_add(struct shrinker *shrinker);

0 commit comments

Comments
 (0)