Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3081275imw; Mon, 11 Jul 2022 01:03:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saQdVe1fIyu5YfUfCUDansEnnNmofC/9d0g4GrtRIQGDstNytU+3AwPqOuob4z3pzsuOeD X-Received: by 2002:a05:6402:1659:b0:43a:1735:e1ce with SMTP id s25-20020a056402165900b0043a1735e1cemr23352218edx.196.1657526611760; Mon, 11 Jul 2022 01:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657526611; cv=none; d=google.com; s=arc-20160816; b=L2NjM0+5qkwACDyKg9933PiAOlL2qywXQjLJO/YwXKTKcO5/zCH3a+D44zMyeZRoeD oNnz5cIP3spNB6Ehm+t3P4V44au1PG9vbPHHFAgrqg4lNXIy4+y8UmM8JO799uge5dyd Cbh9gLbY2zNOeuF0L6QFNIxXVo4lADQe3VgHBpZjNENOxKMf0xvQET77qfvvLMuu+29o QOyC5ZD125PBk59CNHiQDGLSEBeyqsObJiaJqqHIgb0Y4K110K74Im/9tg6pqKF4+b38 ydCXaxvx6K/obPegJ+jSlp4SJKFj4vPC8+9yv7m9VJeKlzYhoFnqabEdFceQLF7CyGbd SJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=3qBfQlQfdU09QEEwV0HGZdCrMBukE6uh45ywo3vjpG8=; b=foo23kc/bfKWdWU5bvWFmvIq3nROrDAgsF1VMsmU9ktchruzwRvLhgowCEEpCJ9uF7 BjWDHxlUcAu4EBSDJsxFdem4U4iWcxMuSg0lmK3jekfhl0ga1sjVblA76ZZgIXEfE/fB 9dmvxGroCANuQ2XqopD5eoaLkhJXD0o+6OcpQhzA8zLHbCy90xDNNo13/D/zSwI0EniL 6yPyrZpYjzDm+tJk41sW4Buwd+Y8ywkipCO3sDess8BtUPjpr2le6ru0kskg0uFd2gHe L5L49QO2PEtcKYqVcqLFx3NbTd3vqow0SevS32jm5ICU1Hk3FEksQobJaFdOYsQMD+Kx C2Bw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr25-20020a1709073f9900b0072b4afac56fsi6588377ejc.327.2022.07.11.01.03.06; Mon, 11 Jul 2022 01:03:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbiGKHuq (ORCPT + 99 others); Mon, 11 Jul 2022 03:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbiGKHun (ORCPT ); Mon, 11 Jul 2022 03:50:43 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E8E911C932; Mon, 11 Jul 2022 00:50:41 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19F41176B; Mon, 11 Jul 2022 00:50:42 -0700 (PDT) Received: from [10.57.12.169] (unknown [10.57.12.169]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D850E3F70D; Mon, 11 Jul 2022 00:50:38 -0700 (PDT) Message-ID: <5b3d0cea-482c-a908-8575-e5846e43b286@arm.com> Date: Mon, 11 Jul 2022 08:50:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] sched/schedutil: Fix deadlock between cpuset and cpu hotplug when using schedutil Content-Language: en-US To: Xuewen Yan Cc: 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 References: <20220705123705.764-1-xuewen.yan@unisoc.com> <9ade9d43-3ed1-1239-f26e-73145856275a@arm.com> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 7/11/22 08:43, Xuewen Yan wrote: > On Mon, Jul 11, 2022 at 3:32 PM Lukasz Luba wrote: >> >> Hi Xuewen, >> >> On 7/11/22 08:21, Xuewen Yan wrote: >>> Hi all >>> >>> This deadlock is inevitable, any comment? >> >> Could you tell me how to reproduce this? >> Is there a need of special cgroup setup? > > This deadlock occurs when we run the monkey test on an Android phone, > at the same time, randomly put online or offline a cpu core. > Indeed the thread-A which get the cgroup_threadgroup_rwsem and waiting > for the cpu_hotplug_lock is the thread whose name is "OomAdjuster" in > android. Thanks, let me have a look. We have some hotplug stress tests in our EAS mainline integration tests, which haven't triggered this issue. I'll try to trigger this on mainline kernel. > > And I see the cpu_hotplug_lock is added by the patch: > https://lore.kernel.org/all/20220121101210.84926-1-zhangqiao22@huawei.com/ Thanks for the pointer.