Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2270678rwb; Mon, 15 Aug 2022 02:07:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hvqED+Z/laC23wzIcuY+wwRAWEqbZkdOpYjReJj6PQHvHPe5RmZ8aB9CNvgFCy1r0dniK X-Received: by 2002:a17:907:2c47:b0:730:6dfb:b32c with SMTP id hf7-20020a1709072c4700b007306dfbb32cmr10019233ejc.284.1660554452523; Mon, 15 Aug 2022 02:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660554452; cv=none; d=google.com; s=arc-20160816; b=qWyeCDzw5wZm9XbL17g391u/piQMQOigltSmXQlPlbFWETtBe8dP1izXtWHG1nSqBR 1QsEZ/50YEBQ/og4MWKOPwV1GKF5/D+JDhzOf7zb7iHltdbYg2ABP+zjF/h1PrmUPrkE WX0sXk8gC5/O2/LEWX/sbP0RGEZc3J4Lw2+3Tt358gZt+fZCI64khBThsM2SL3M76Tm9 Qd5LqyL/PipV6IIhd4Pia7FSeyso4ZcQ8ORwppLSPhFpfnTtNss9SrBu9iQtVS/AMTxl e8OEk7TzOwERdpsQ8KnLsdoYY/jrO5SEtBSppcqXVwsQIhswm6DUqf3V+ZHnDeg8pYTj LyLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wmyLVShEDIO9zR9fd/Zd6KIwqvJ7WmFq3Q+f4veJxx4=; b=UwwEa+KvwaTx0FRkt2FFVJexmorBI8B0OLJzB1hsRbn7/DD4zd2Y4jNtXycVIOZ5sZ xKln2fReqHMqBwdiTZ94fkikqK6Slei+Lu1riCrXyb6dX2t7OWn/1xgu283vetD9jIRp h5CpXkDFJuG/jOZVtIg8ebtYknylhvpD8GGdC3WPMKHfDxnhEpmxuZeaWFw/2csuEB6b eUotSx2HEkG0yPxVdJ6D9509rHgVClPzxJnv96rjwrjE7lip0miTl/Ww0asXeclwxK6s bIjA86pAa0f0FzPfcNFQbQ2i3iOPVleRFn8V9QoxIzn6CD9MKSvVuPwfiIirDcClDBb3 JjjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Hr7FJApv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a0564021f9000b004407bc2b702si6912419edc.402.2022.08.15.02.07.05; Mon, 15 Aug 2022 02:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Hr7FJApv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232663AbiHOJGB (ORCPT + 99 others); Mon, 15 Aug 2022 05:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiHOJGA (ORCPT ); Mon, 15 Aug 2022 05:06:00 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 297B0BC8F; Mon, 15 Aug 2022 02:05:59 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D5BE03486C; Mon, 15 Aug 2022 09:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1660554357; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wmyLVShEDIO9zR9fd/Zd6KIwqvJ7WmFq3Q+f4veJxx4=; b=Hr7FJApvmpacg+qsEsJ9ov0c/tj4crcwwKaC5VvYz8JZ5R2TTE2h7cECeD9EJfzdYfYWAc cN6spABRKoxVA3aiXtRq3fSz0vQiAI+DH1UU/0eoeqEB7IGt1oHlgnYia5D4+XmpkvfT97 uWu7YDaPLs1jhiKEkKAQrGk8nHMwqEU= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9321913A93; Mon, 15 Aug 2022 09:05:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lVbSInUM+mLXTwAAMHmgww (envelope-from ); Mon, 15 Aug 2022 09:05:57 +0000 Date: Mon, 15 Aug 2022 11:05:56 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Mukesh Ojha Cc: Tejun Heo , Imran Khan , lizefan.x@bytedance.com, hannes@cmpxchg.org, tglx@linutronix.de, steven.price@arm.com, peterz@infradead.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Zhao Gongyi , Zhang Qiao Subject: Re: Query regarding deadlock involving cgroup_threadgroup_rwsem and cpu_hotplug_lock Message-ID: <20220815090556.GB27407@blackbody.suse.cz> References: <8245b710-8acb-d8e6-7045-99a5f71dad4e@oracle.com> <26d0e4cc-be0e-2c12-6174-dfbb1edb1ed6@oracle.com> <224b19f3-912d-b858-7af4-185b8e55bc66@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Cc: Zhao Gongyi , Zhang Qiao On Fri, Aug 12, 2022 at 03:57:00PM +0530, Mukesh Ojha wrote: > The original patch of yours [1] and the revert of [2] is fixing the issue > and it is also confirmed here [3]. > Can we get proper fix merge on your tree? > > [1] https://lore.kernel.org/lkml/YuGbYCfAG81mZBnN@slm.duckdns.org/ > > [2] > https://lore.kernel.org/all/20220121101210.84926-1-zhangqiao22@huawei.com/ The revert + Tejun's patch looks fine wrt the problem of the reverted patch (just moves cpus_read_lock to upper callers). I'd just suggest a comment that'd explicitly document also the lock order that we stick to, IIUC, it should be: cpu_hotplug_lock // cpus_read_lock cgroup_threadgroup_rwsem cpuset_rwsem Michal > > [3] https://lore.kernel.org/lkml/CAB8ipk-72V-bYRfL-VcSRSyXTeQqkBVj+1d5MHSVV5CTar9a0Q@mail.gmail.com/ > > -Mukesh