lkml.org 
[lkml]   [2013]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Avoid useless inodes and dentries reclamation
The new shrinker infrastructure in mmotm looks like it will make this
problem worse.

old code:
shrink_slab()
for_each_shrinker {
do_shrinker_shrink(); // one per batch
prune_super()
grab_super_passive()
}
}

Which means we've got at _most_ one grab_super_passive() per batch. The
new code is something like this:

shrink_slab()
{
list_for_each_entry(shrinker, &shrinker_list, list) {
for_each_node_mask(... shrinkctl->nodes_to_scan) {
shrink_slab_node()
}
}
}

shrink_slab_node()
{
max_pass = shrinker->count_objects(shrinker, shrinkctl);
// ^^ does grab_super_passive()
...
while (total_scan >= batch_size) {
ret = shrinker->scan_objects(shrinker, shrinkctl);
// ^^ does grab_super_passive()
}
}

We've got an extra grab_super_passive()s in the case where we are
actually doing a scan, plus we've got the extra for_each_node_mask()
loop. That means even more lock acquisitions in the multi-node NUMA
case, which is exactly where we want to get rid of global lock acquisitions.



\
 
 \ /
  Last update: 2013-08-29 21:21    [W:0.211 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site