]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: shrinkers: add scan interface for shrinker debugfs
authorRoman Gushchin <roman.gushchin@linux.dev>
Wed, 1 Jun 2022 03:22:27 +0000 (20:22 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:03 +0000 (20:15 -0400)
commit70747067b5e00fdb5f26297583cc20fe079f57cd
tree96653f06f0d6d1365b484d8359ff2752f1d18d8b
parent55936cb42c887b04c4c34bcd64ad480d7174daea
mm: shrinkers: add scan interface for shrinker debugfs

Add a scan interface which allows to trigger scanning of a particular
shrinker and specify memcg and numa node.  It's useful for testing,
debugging and profiling of a specific scan_objects() callback.  Unlike
alternatives (creating a real memory pressure and dropping caches via
/proc/sys/vm/drop_caches) this interface allows to interact with only one
shrinker at once.  Also, if a shrinker is misreporting the number of
objects (as some do), it doesn't affect scanning.

Link: https://lkml.kernel.org/r/20220601032227.4076670-7-roman.gushchin@linux.dev
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/admin-guide/mm/shrinker_debugfs.rst
mm/shrinker_debug.c