[PATCH] slub: move synchronize_sched out of slab_mutex on shrink
Colin Ian King
colin.king at canonical.com
Fri Dec 16 17:35:31 UTC 2016
On 15/12/16 09:00, Thadeu Lima de Souza Cascardo wrote:
> 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?
Yakkety SRU and Zesty
Colin
>
> Thanks.
> Cascardo.
>
More information about the kernel-team
mailing list