Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AFFCC433E2 for ; Wed, 2 Sep 2020 13:53:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D196E2078E for ; Wed, 2 Sep 2020 13:53:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D196E2078E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 786E76B0070; Wed, 2 Sep 2020 09:53:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7381F6B0073; Wed, 2 Sep 2020 09:53:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6753D6B0074; Wed, 2 Sep 2020 09:53:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 52D2C6B0070 for ; Wed, 2 Sep 2020 09:53:04 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 06622362C for ; Wed, 2 Sep 2020 13:53:04 +0000 (UTC) X-FDA: 77218262688.17.curve44_210d191270a1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 2F091180D0194 for ; Wed, 2 Sep 2020 13:53:02 +0000 (UTC) X-HE-Tag: curve44_210d191270a1 X-Filterd-Recvd-Size: 3272 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Sep 2020 13:53:01 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 77D7EB630; Wed, 2 Sep 2020 13:53:00 +0000 (UTC) Date: Wed, 2 Sep 2020 15:52:58 +0200 From: Michal Hocko To: Pavel Tatashin Cc: Vlastimil Babka , Roman Gushchin , Bharata B Rao , "linux-mm@kvack.org" , Andrew Morton , Johannes Weiner , Shakeel Butt , Vladimir Davydov , "linux-kernel@vger.kernel.org" , Kernel Team , Yafang Shao , stable , Linus Torvalds , Sasha Levin , Greg Kroah-Hartman , David Hildenbrand Subject: Re: [PATCH v2 00/28] The new cgroup slab memory controller Message-ID: <20200902135258.GH4617@dhcp22.suse.cz> References: <20200127173453.2089565-1-guro@fb.com> <20200130020626.GA21973@in.ibm.com> <20200130024135.GA14994@xps.DHCP.thefacebook.com> <20200813000416.GA1592467@carbon.dhcp.thefacebook.com> <6469324e-afa2-18b4-81fb-9e96466c1bf3@suse.cz> <20200902113204.GD4617@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 2F091180D0194 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 02-09-20 08:53:49, Pavel Tatashin wrote: > On Wed, Sep 2, 2020 at 7:32 AM Michal Hocko wrote: > > > > On Wed 02-09-20 11:53:00, Vlastimil Babka wrote: > > > >> > > Thread #2: ccs killer kthread > > > >> > > css_killed_work_fn > > > >> > > cgroup_mutex <- Grab this Mutex > > > >> > > mem_cgroup_css_offline > > > >> > > memcg_offline_kmem.part > > > >> > > memcg_deactivate_kmem_caches > > > >> > > get_online_mems > > > >> > > mem_hotplug_lock <- waits for Thread#1 to get read access > > > > And one more thing. THis has been brought up several times already. > > Maybe I have forgoten but why do we take hotplug locks in this path in > > the first place? Memory hotplug notifier takes slab_mutex so this > > shouldn't be really needed. > > Good point, it seems this lock can be completely removed from > memcg_deactivate_kmem_caches I am pretty sure we have discussed that in the past. But I do not remember the outcome. Either we have concluded that this is indeed the case but nobody came up with a patch or we have hit some obscure issue... Maybe David/Roman rememeber more than I do. -- Michal Hocko SUSE Labs