From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 94246C43603 for ; Tue, 10 Dec 2019 18:32:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 666F920663 for ; Tue, 10 Dec 2019 18:32:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 666F920663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 003916B2D68; Tue, 10 Dec 2019 13:32:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EF6B36B2DA4; Tue, 10 Dec 2019 13:32:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0AF46B2DA5; Tue, 10 Dec 2019 13:32:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id CAFF76B2D68 for ; Tue, 10 Dec 2019 13:32:38 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 7E6F4641D for ; Tue, 10 Dec 2019 18:32:38 +0000 (UTC) X-FDA: 76250077596.23.stage90_6e53965538428 X-HE-Tag: stage90_6e53965538428 X-Filterd-Recvd-Size: 2172 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Dec 2019 18:32:37 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 8B0DC3ED44; Tue, 10 Dec 2019 18:32:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 8A2BF3E95D; Tue, 10 Dec 2019 18:32:37 +0000 (UTC) Date: Tue, 10 Dec 2019 18:32:37 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Qian Cai cc: Daniel Wagner , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: lockdep warns: cpu_hotplug_lock.rw_sem --> slab_mutex --> kn->count#39 In-Reply-To: <2F924F88-8146-4868-9099-D824EAFA840E@lca.pw> Message-ID: References: <20191209182418.7vxer6vmre67ewvt@beryllium.lan> <2F924F88-8146-4868-9099-D824EAFA840E@lca.pw> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="531401748-1172478698-1576002757=:14347" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000282, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --531401748-1172478698-1576002757=:14347 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, 9 Dec 2019, Qian Cai wrote: > It happens to me too with a probably easier to trigger deadlock. Basica= lly, we have, > > memcg_create_kmem_cache(): > cpu_hotplug_lock.rw_sem/mem_hotplug_lock.rw_sem =E2=80=94> kn->count Right. Memcg runs this function at cgroup creation time. sysfs initialization was designed to run a at boot. So the sysfs initialization needs a rewrite of its serialization for the memcg case. We cannot loop over the list of all kmem caches holding the slab_mutex anymore. --531401748-1172478698-1576002757=:14347--