Revert "mm: zero-seek shrinkers"
This reverts commit 0f8b75a710
.
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
parent
dcfda39c8a
commit
d2ab10877a
@ -240,9 +240,6 @@ static int kernfs_fill_super(struct super_block *sb, unsigned long magic)
|
||||
sb->s_export_op = &kernfs_export_ops;
|
||||
sb->s_time_gran = 1;
|
||||
|
||||
/* sysfs dentries and inodes don't require IO to create */
|
||||
sb->s_shrink.seeks = 0;
|
||||
|
||||
/* get root inode, initialize and unlock it */
|
||||
mutex_lock(&kernfs_mutex);
|
||||
inode = kernfs_get_inode(sb, info->root->kn);
|
||||
|
@ -512,9 +512,6 @@ int proc_fill_super(struct super_block *s)
|
||||
*/
|
||||
s->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;
|
||||
|
||||
/* procfs dentries and inodes don't require IO to create */
|
||||
s->s_shrink.seeks = 0;
|
||||
|
||||
pde_get(&proc_root);
|
||||
root_inode = proc_get_inode(s, &proc_root);
|
||||
if (!root_inode) {
|
||||
|
15
mm/vmscan.c
15
mm/vmscan.c
@ -479,18 +479,9 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
|
||||
nr = atomic_long_xchg(&shrinker->nr_deferred[nid], 0);
|
||||
|
||||
total_scan = nr;
|
||||
if (shrinker->seeks) {
|
||||
delta = freeable >> priority;
|
||||
delta *= 4;
|
||||
do_div(delta, shrinker->seeks);
|
||||
} else {
|
||||
/*
|
||||
* These objects don't require any IO to create. Trim
|
||||
* them aggressively under memory pressure to keep
|
||||
* them from causing refetches in the IO caches.
|
||||
*/
|
||||
delta = freeable / 2;
|
||||
}
|
||||
delta = freeable >> priority;
|
||||
delta *= 4;
|
||||
do_div(delta, shrinker->seeks);
|
||||
|
||||
total_scan += delta;
|
||||
if (total_scan < 0) {
|
||||
|
@ -524,7 +524,7 @@ static unsigned long scan_shadow_nodes(struct shrinker *shrinker,
|
||||
static struct shrinker workingset_shadow_shrinker = {
|
||||
.count_objects = count_shadow_nodes,
|
||||
.scan_objects = scan_shadow_nodes,
|
||||
.seeks = 0, /* ->count reports only fully expendable nodes */
|
||||
.seeks = DEFAULT_SEEKS,
|
||||
.flags = SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user