Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3723747imw; Mon, 11 Jul 2022 14:34:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seoWK4mixBBNJtkIq77WGVxYmjRQ3pNrysXceH4v70hxt5vDzGG1CPhVmcbUd43pqpl8F7 X-Received: by 2002:a17:907:970d:b0:72b:3589:a22c with SMTP id jg13-20020a170907970d00b0072b3589a22cmr15092915ejc.621.1657575241270; Mon, 11 Jul 2022 14:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657575241; cv=none; d=google.com; s=arc-20160816; b=llQEpwMJGZ9HAipSOZ6/+MLE8n1zLL0OkwXcbn+hOkRR/5DRsLcAvJ7PaCZFHVPXcK AnPiQtM3vbI0eXVuY467IH/kC5eAqjvWJPFBP1UXtlnJotKGl1++4uSwSecsmViQP3E6 EoUxj9LRMKlFLhh8l70wIgQWbjXTe5fPMSEkHb6DwaGnsgvQxR4UTUts5/q4whKHOZy0 tb3cf8J44pcqRdfDMQc4bixP6OCnVFf8pwwcFqVGiWYVRpXXVLtQLcB+zU69E1X2eLq+ gXfLcwdF7Pyldokx8OZbgmhTP3LCkQ5IprUdk4GIRgPevB+B1eauUD7qz66cL6pwGwxk 0HJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ZCce/3nckT1iDrTDmO5SMS64Qvx9mQkSPxjTucJlXZg=; b=SqSG3pwJI4i1m6Dkbimzzynbu87Hz8asKGmyfkcdfPcT3ebzsdIZjgS2oOC49dytyO +XNkWPUJwVkFIOD+EgoKLHlSma++aFXoG4HHvgLBkn+Jn9BV2ohV994uXHqMJrGrv35f i6lMuRyrsq4hXPb5O99v/MOA49JMLr4LdUZ1+uCRMQe3J5waWISSo3JwXWqlVrqCHWOM bQZ4vquu8iEVE3fhIBZGpQZCB8YE0uy7c1p253iFSr/jYRF1r/xvUt7YT92pNdC8HCvA y2agrxCPmvifSEZzsZQCN7YEwVlp1caCbfUSVDlasOGp6tP7gMWdZSyBDXb5/Z1lmCIP TTaw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ap13-20020a17090735cd00b0072af3c24981si9868954ejc.425.2022.07.11.14.33.34; Mon, 11 Jul 2022 14:34:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbiGKVLg (ORCPT + 99 others); Mon, 11 Jul 2022 17:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiGKVLf (ORCPT ); Mon, 11 Jul 2022 17:11:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61D22B609; Mon, 11 Jul 2022 14:11:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3C57161699; Mon, 11 Jul 2022 21:11:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7967C34115; Mon, 11 Jul 2022 21:11:31 +0000 (UTC) Date: Mon, 11 Jul 2022 17:11:30 -0400 From: Steven Rostedt To: Tejun Heo 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, 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, Waiman Long Subject: Re: [PATCH] sched/schedutil: Fix deadlock between cpuset and cpu hotplug when using schedutil Message-ID: <20220711171130.6390600b@gandalf.local.home> In-Reply-To: References: <20220705123705.764-1-xuewen.yan@unisoc.com> <20220711174629.uehfmqegcwn2lqzu@wubuntu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 On Mon, 11 Jul 2022 10:58:28 -1000 Tejun Heo wrote: > I don't think lockdep would be able to track CPU1 -> CPU2 dependency here > unfortunately. > > > AFAIU: > > > > > > CPU0 CPU1 CPU2 > > > > // attach task to a different > > // cpuset cgroup via sysfs > > __acquire(cgroup_threadgroup_rwsem) > > > > // pring up CPU2 online > > __acquire(cpu_hotplug_lock) > > // wait for CPU2 to come online Should there be some annotation here that tells lockdep that CPU1 is now blocked on CPU2? Then this case would be caught by lockdep. -- Steve > > // bringup cpu online > > // call cpufreq_online() which tries to create sugov kthread > > __acquire(cpu_hotplug_lock) copy_process() > > cgroup_can_fork() > > cgroup_css_set_fork() > > __acquire(cgroup_threadgroup_rwsem) > > // blocks forever // blocks forever // blocks forever > >