[PATCH] slub: move synchronize_sched out of slab_mutex on shrink

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Thu Dec 15 09:00:19 UTC 2016

On Wed, Dec 14, 2016 at 02:29:10PM +0000, Colin King wrote:
> From: Vladimir Davydov <vdavydov.dev at gmail.com>
> BugLink: http://bugs.launchpad.net/bugs/1649905
> synchronize_sched() is a heavy operation and calling it per each cache
> owned by a memory cgroup being destroyed may take quite some time.  What
> is worse, it's currently called under the slab_mutex, stalling all works
> doing cache creation/destruction.
> Actually, there isn't much point in calling synchronize_sched() for each
> cache - it's enough to call it just once - after setting cpu_partial for
> all caches and before shrinking them.  This way, we can also move it out
> of the slab_mutex, which we have to hold for iterating over the slab
> cache list.


What series is this targeted to?


More information about the kernel-team mailing list