From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24FD7CCA47B for ; Mon, 11 Jul 2022 07:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbiGKHuq (ORCPT ); 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 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.