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....@gmail.com> > Reported-by: Doug Smythies <dsmyth...@telus.net> > Cc: Christoph Lameter <c...@linux.com> > Cc: David Rientjes <rient...@google.com> > Cc: Johannes Weiner <han...@cmpxchg.org> > Cc: Joonsoo Kim <iamjoonsoo....@lge.com> > Cc: Michal Hocko <mho...@kernel.org> > Cc: Pekka Enberg <penb...@kernel.org>
Acked-by: Joonsoo Kim <iamjoonsoo....@lge.com> These two patches should be sent to stable. Isn't it? Thanks.