Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-20 Thread Michal Hocko
On Thu 20-10-16 20:44:35, Andrew Morton wrote: > On Tue, 4 Oct 2016 16:14:17 +0300 Vladimir Davydov > wrote: > > > Creating a lot of cgroups at the same time might stall all worker > > threads with kmem cache creation works, because kmem cache creation is > > done with the slab_mutex held. The p

Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-20 Thread Andrew Morton
On Tue, 4 Oct 2016 16:14:17 +0300 Vladimir Davydov wrote: > Creating a lot of cgroups at the same time might stall all worker > threads with kmem cache creation works, because kmem cache creation is > done with the slab_mutex held. The problem was amplified by commits > 801faf0db894 ("mm/slab: l

Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-06 Thread Michal Hocko
On Tue 04-10-16 16:14:17, Vladimir Davydov wrote: [...] > >From 10f5f126800912c6a4b78a8b615138c1322694ad Mon Sep 17 00:00:00 2001 > From: Vladimir Davydov > Date: Sat, 1 Oct 2016 16:39:09 +0300 > Subject: [PATCH] mm: memcontrol: use special workqueue for creating per-memcg > caches > > Creating

Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-04 Thread Vladimir Davydov
On Mon, Oct 03, 2016 at 03:19:31PM +0200, Michal Hocko wrote: > On Mon 03-10-16 15:35:06, Vladimir Davydov wrote: > > On Mon, Oct 03, 2016 at 02:06:42PM +0200, Michal Hocko wrote: > > > On Sat 01-10-16 16:56:47, Vladimir Davydov wrote: > > > > Creating a lot of cgroups at the same time might stall

Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-03 Thread Michal Hocko
On Mon 03-10-16 15:35:06, Vladimir Davydov wrote: > On Mon, Oct 03, 2016 at 02:06:42PM +0200, Michal Hocko wrote: > > On Sat 01-10-16 16:56:47, Vladimir Davydov wrote: > > > Creating a lot of cgroups at the same time might stall all worker > > > threads with kmem cache creation works, because kmem

Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-03 Thread Vladimir Davydov
On Mon, Oct 03, 2016 at 02:06:42PM +0200, Michal Hocko wrote: > On Sat 01-10-16 16:56:47, Vladimir Davydov wrote: > > Creating a lot of cgroups at the same time might stall all worker > > threads with kmem cache creation works, because kmem cache creation is > > done with the slab_mutex held. To pr

Re: [PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-03 Thread Michal Hocko
On Sat 01-10-16 16:56:47, Vladimir Davydov wrote: > Creating a lot of cgroups at the same time might stall all worker > threads with kmem cache creation works, because kmem cache creation is > done with the slab_mutex held. To prevent that from happening, let's use > a special workqueue for kmem ca

[PATCH 1/2] mm: memcontrol: use special workqueue for creating per-memcg caches

2016-10-01 Thread Vladimir Davydov
Creating a lot of cgroups at the same time might stall all worker threads with kmem cache creation works, because kmem cache creation is done with the slab_mutex held. To prevent that from happening, let's use a special workqueue for kmem cache creation with max in-flight work items equal to 1. Li