Re: [PATCH 2/2] slub: move synchronize_sched out of slab_mutex on shrink
From: Joonsoo Kim
Date: Thu Oct 06 2016 - 02:27:16 EST
Ccing Doug, original reporter.
On Sat, Oct 01, 2016 at 04:56:48PM +0300, Vladimir Davydov wrote:
> 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.
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=172991
> Signed-off-by: Vladimir Davydov <vdavydov.dev@xxxxxxxxx>
> Reported-by: Doug Smythies <dsmythies@xxxxxxxxx>
> Cc: Christoph Lameter <cl@xxxxxxxxx>
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxxxx>
> Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
These two patches should be sent to stable. Isn't it?