Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2316812rwb; Mon, 15 Aug 2022 03:13:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR69Xn2aQ2vzLVYZaYRto5u8nhTN+z/r/MqAeJh16jvPKtcnlvwi3Ae8vUEowrDlP+dXRF9t X-Received: by 2002:a63:64a:0:b0:429:8c1a:81a2 with SMTP id 71-20020a63064a000000b004298c1a81a2mr341175pgg.503.1660558437176; Mon, 15 Aug 2022 03:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660558437; cv=none; d=google.com; s=arc-20160816; b=qWZLezPYV7fpuu+jERiYWZufZrLvbCKGXXUXgZbsu6+qBOCO7nCtOns5Ve6NDcDdc9 +pC2Uc8HX0ej3DGdhdQFNIzINznfvJwrrtAd/AhOLODE4S64quA6YZyI3TUHmINoXUh+ DeMaFsM9kogdmGrhiyyRdJVxIcnYRk113MipuGdLHhKeZYUrr33EuIup+JenppAIGsc7 MJHKE1ZrFSBbx++zxWDAV+QgieCwNYldQIX4deXX8qfrYq1KMfGqoqq3HDvIGEzMH/LC H7Yk6Gad4x779/urYVeUZ+b8VpDboE9t64ebiepc/mckkloMiIMga/3hZl5iP6eQ7EvN iS4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=m64dCm5y6abMgyqwAQFCPVcLqHA6yb02EbRC6+noQbw=; b=GMzr8vO+4mQIfZe086pIfcu1nwfvWgLvqN8xTuO+nS/8YqJz/hSYw2mGMrbeFE5EgZ yAI7jEYVzr4ma4q+aKDC0Z6KzNIFcqqz5SuPGwCDL4UA0ClN/NVLEzwVSKgFuUIxcKHu KbfbocO+LqoPOKkgE9OG6IMUjLETP8NaBeS3qGP7e/LauFwYOFEu+hNDWm8wh5DvnbBk KyNXetQFa2UJQ17rsjLEhXLsI0A2tIGZTaTQO4vi9m93r+baidU8XAf5KqayNTDYTn52 AaiqgFiM0QAVOi+WMx/UoKu5ZQIl3wR6x2OJ+KKwN8xmH7Gb6tXC/MuAX1fdDatzQVaX DBng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nnmZdSGg; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a170903300300b001714f0dbebdsi8528724pla.523.2022.08.15.03.13.46; Mon, 15 Aug 2022 03:13:57 -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=@gmail.com header.s=20210112 header.b=nnmZdSGg; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241972AbiHOJ0L (ORCPT + 99 others); Mon, 15 Aug 2022 05:26:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbiHOJ0G (ORCPT ); Mon, 15 Aug 2022 05:26:06 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F01613F8B; Mon, 15 Aug 2022 02:26:05 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id z6so9875998lfu.9; Mon, 15 Aug 2022 02:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=m64dCm5y6abMgyqwAQFCPVcLqHA6yb02EbRC6+noQbw=; b=nnmZdSGgeYdNQlt7klf2KWrMATSS13t2yHEkVMt+x0DICtLrR28QtzNdoDTRaEmPom z+Gs8Dqq57cX383CEv81ElNXe4hwEdFC/yx/espCw2xpTQameFuDpE7JbCuTbWB+Kbol yO27DHFvxupX+VcmZM86sl6boJZeqggbNf4o8YzZtEaZQeYGSShIxAUkWIBfNtoTsM9T Cr27BqXZo98/XfG56V1Yvc/jztezBrzouNmTZvHA/wtgonY4MU0pci1t+I+tRr3mf5HO sdAx6MpIxbc1GK37dE/4nGERixFc6AjZOLsoU/8XHkj2Yc63r6S/c5WZxknVrcBXx/3D 7pig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=m64dCm5y6abMgyqwAQFCPVcLqHA6yb02EbRC6+noQbw=; b=RT6YJPAJueei7w63vVPs9dVCRx4QBOfpXclsM4r//GL8EYpiBly6Xu4QKMs8NNVE6H o8F4fHgrQt/4fAn0axpS/aDhv0q0qHnc090DR/mqNB4SLdLb7EayCyCjc58BOIKe6TIM NGSirZkSUAXUmj5MGKMlr6oF1l357jLYtLHkaP9lowxWqqp/9zHu1kwb0TMLxC1Srf/X QrYT1oRsKWRFaPpFl/1cieJS0ff7j8Jj2Qv/ilCYnXQxT1E924OwTEulNX8bCtI/HSLX R7d3gJNpMw2i/pO/U9qorihpa5qt8qb2RUY7woVaDoDGemCtYHLh8ZwcB+EQr2xh1q8Q eDkw== X-Gm-Message-State: ACgBeo3Y/6eknJtqCYI3SgozN9+pUujbs9w/KxY8UWWnIk0U9QE8VLkg Kklc77WFYZcCtYfGwfxpN8YoLgZYwV5v7fiihYk= X-Received: by 2002:a05:6512:168d:b0:491:3206:b63 with SMTP id bu13-20020a056512168d00b0049132060b63mr3115806lfb.149.1660555563305; Mon, 15 Aug 2022 02:26:03 -0700 (PDT) MIME-Version: 1.0 References: <8245b710-8acb-d8e6-7045-99a5f71dad4e@oracle.com> <26d0e4cc-be0e-2c12-6174-dfbb1edb1ed6@oracle.com> <224b19f3-912d-b858-7af4-185b8e55bc66@quicinc.com> <20220815090556.GB27407@blackbody.suse.cz> In-Reply-To: <20220815090556.GB27407@blackbody.suse.cz> From: Xuewen Yan Date: Mon, 15 Aug 2022 17:25:52 +0800 Message-ID: Subject: Re: Query regarding deadlock involving cgroup_threadgroup_rwsem and cpu_hotplug_lock To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Mukesh Ojha , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Hi Michal On Mon, Aug 15, 2022 at 5:06 PM Michal Koutn=C3=BD wrote= : > > +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 is= sue > > 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.c= om/ > > The revert + Tejun's patch looks fine wrt the problem of the reverted > patch (just moves cpus_read_lock to upper callers). Your means is that the problem should be fixed by [1]+[2]'s revert ? I just tested the case which reverted the [2]. Need I test with [1] and [2]= ? Thanks! > > 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+1d5M= HSVV5CTar9a0Q@mail.gmail.com/ > > > > -Mukesh