Skip to content
Commit e83b39d6 authored by Jan Kara's avatar Jan Kara Committed by Andrew Morton
Browse files

mm: make drop_caches keep reclaiming on all nodes

Currently, drop_caches are reclaiming node-by-node, looping on each node
until reclaim could not make progress.  This can however leave quite some
slab entries (such as filesystem inodes) unreclaimed if objects say on
node 1 keep objects on node 0 pinned.  So move the "loop until no
progress" loop to the node-by-node iteration to retry reclaim also on
other nodes if reclaim on some nodes made progress.  This fixes problem
when drop_caches was not reclaiming lots of otherwise perfectly fine to
reclaim inodes.

Link: https://lkml.kernel.org/r/20221115123255.12559-1-jack@suse.cz


Signed-off-by: default avatarJan Kara <jack@suse.cz>
Reported-by: default avatarYou Zhou <you.zhou@intel.com>
Reported-by: default avatarPengfei Xu <pengfei.xu@intel.com>
Tested-by: default avatarPengfei Xu <pengfei.xu@intel.com>
Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent d09e8ca6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment