Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp289019imw; Tue, 12 Jul 2022 20:19:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sqZQajSO4nZQkgqkMSSLUNjk22Dh1mGnPJhKHrra2Fa+WgqjH/YDZqKHWGx6eOH0m6IpL7 X-Received: by 2002:a17:906:84f7:b0:72b:57c2:5e13 with SMTP id zp23-20020a17090684f700b0072b57c25e13mr1309956ejb.702.1657682384661; Tue, 12 Jul 2022 20:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657682384; cv=none; d=google.com; s=arc-20160816; b=DJsyiyCg1P5uNFW2fyt0wTBjJUDJDbsY+tj1ag1znUqzWrhZyPSwPsKhk39szcHR+T ggWWYCJfEzDcJNYo4xTO9oHIjjrrjIO5epB6auQD18qQNWvvd5FoouEjOXRiGmwlwdsB TPGckd14a3xK3s4k31RmzLFWdkUWvfMuiFUXuMxzstw2UMG6wQAtBQsSH38vRxBRqRNM 1YuPA9PA0Tt72L8Gn/NXhxtg7KRcQb3KTGgdGai5u/V7p01NG2SeSNIKMU+K7eozYPG0 NzoyBW7HQpRpq7pLjOwrymY0Nyv2P4Xsha4l+l6Lz3Qnqm2MB6tYM978K/gk4sKJQ68n UWoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=uu7yfJwTmGgJzlT0USq6IvgcHtE1wUeXRQtFy2CZjgI=; b=ICETs+3m6c+9PUhP2fWp4G4hRXHGlHKyBtdXXgK6cVKKZwRVQiEVuSVjH/Z9zLse2J aEZ7yIW5S0HQAz+xOKItCai2cIUN/J5kjjy+W0w2LNcIO5uxk4sP0wKhzQtJk0stgWEY LFcmwQ46vewKHeiCyeQyA1ONyoIe99cxyEuhR3NwfpUmkwTSkNXDGu7UQbGTn6IgUWEM w+U1dGrvq90Aiwrki/bYo72QsKEXYf4G52nSHkMYL1TOWzY7271+lU5Go+fFDHyaiDZg HUURCu/xGyRGJo86CKHT1PQyXrLY+GRLAYpaGp+IybtardbotL8R9VWnQcAtbBp+SOcP SoSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P0+NrwkA; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a05640235c400b0043a9041dd22si3188960edc.297.2022.07.12.20.19.19; Tue, 12 Jul 2022 20:19:44 -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=P0+NrwkA; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231315AbiGMDA6 (ORCPT + 99 others); Tue, 12 Jul 2022 23:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbiGMDA5 (ORCPT ); Tue, 12 Jul 2022 23:00:57 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0099D64E2; Tue, 12 Jul 2022 20:00:55 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id o31-20020a17090a0a2200b001ef7bd037bbso1451643pjo.0; Tue, 12 Jul 2022 20:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uu7yfJwTmGgJzlT0USq6IvgcHtE1wUeXRQtFy2CZjgI=; b=P0+NrwkARt5qtH2d9Ftq9LknLWfeKG5UnhqMbtA4um7o/hgsygqMQA6A1xAKK+L6ZG B5dyGjHOt8pWLtlHmWjhWIF7yo4/tcfwbsAO1e1cnP2g7TYDrKCqQeG0aKr9OrVs4kFk +zQOr6QcBq0ZMZYUWlH+Xd1eEntXeznrPBJx9GXc6BcPKSAYHgYa1aFzpib43xXG0TrO zj+Z8+/XWaXinJ27B8fBwhPikw0rlxiK2dJc3SyQlIxotA8GbQ7f1bMko14coy4TkT+u xQR4o7vY0HJ9goahSmCIqoT+KE4jNfTKAgoJpM30oyrmUro8cVuSP9haOOPk5/rzedmb pLQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=uu7yfJwTmGgJzlT0USq6IvgcHtE1wUeXRQtFy2CZjgI=; b=qTjVpKVlmbVk/EHqp/sdfDVrhk5g5HQbHIMoXe83sZBY9iXtA1EOnk3RCioiJdduOX MXq4AyTRPwlLO889GFcNXh6NnKCFeFAJeKAe3QXsTlxNVLUk7kfbspuT7RmdWfejogTB 6p5e7ybr/iwCpEKNg8Bs/WT+8/796MPEyneb5hqfUPpG3ATVfI2Cfb169qO1FlzNdzlm p8WkIrbDhN8cqICsT3H1yEkbi1FmnU1YQf3OLML5c+Dz8aWMPrtJI6nKkmzoUdgvKPyQ m++TI2BDyf42T0k+g/QYzpihk6oQ9DeRh0JJy6d7B0nnLLIO4t2ZtZR2QYeuql7xH7Fm O35g== X-Gm-Message-State: AJIora+hzz/Sa1V78K77crYndUF71yebbQtzbXObF3mRCFQYMAA7NCeS ZT7eMrEFR/NsJn4CVNfJG+g= X-Received: by 2002:a17:902:ec8a:b0:16c:4baa:a50c with SMTP id x10-20020a170902ec8a00b0016c4baaa50cmr1109912plg.62.1657681255327; Tue, 12 Jul 2022 20:00:55 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:9b46]) by smtp.gmail.com with ESMTPSA id a8-20020aa795a8000000b0051c49fb62b7sm7520173pfk.165.2022.07.12.20.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 20:00:54 -0700 (PDT) Sender: Tejun Heo Date: Tue, 12 Jul 2022 17:00:52 -1000 From: Tejun Heo To: Waiman Long Cc: Qais Yousef , Xuewen Yan , rafael@kernel.org, viresh.kumar@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, linux-kernel@vger.kernel.org, ke.wang@unisoc.com, xuewyan@foxmail.com, linux-pm@vger.kernel.org Subject: Re: [PATCH] sched/schedutil: Fix deadlock between cpuset and cpu hotplug when using schedutil Message-ID: References: <20220705123705.764-1-xuewen.yan@unisoc.com> <20220711174629.uehfmqegcwn2lqzu@wubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, Jul 12, 2022 at 10:49:57PM -0400, Waiman Long wrote: > > Well, the only thing I can think of is always grabbing cpus_read_lock() > > before grabbing threadgroup_rwsem. Waiman, what do you think? > > That is a possible solution as cpus_read_lock() is rather lightweight. It is > a good practice to acquire it first. On a similar note, I think we probably should re-enable percpu operations on threadgroup_rwsem too by default and allow users who are affected by slower write path operations to opt-in. After the new CLONE_INTO_CGROUP which doesn't need the rwsem, we have far fewer write lockers after all. Thanks. -- tejun