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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA675C433F5 for ; Tue, 24 May 2022 11:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3crwSFenGJdhhJc3Ipv00ovcd9gyJMsD48nQ7fVKtWI=; b=KpLl877GB5ctJ4 PJtapraZTDH3Vwf8jgd86UFfLOcFPvCcpnf2zS9Rxr+aO6oLMn0zEz96XpSUdAdsRIAelwjESHW3P 4l3P9/wSZMBrXPZzQrlGS9WIfvSgA7VBcXSHJfeNQsZHSNzLW/7hwjJQkEaRXaDJmC0KdDiI/g4ax NFqLdj3VAfD+qxTbgB4uAU/tKikjIzYp2Dt0BZE53D5L5r4MOiRSmVdTGIF7Jstvy/aK6by9rMXXV 4BwPHExCnhgABGnhEAwLn8ML91Vyz1UACIYmMInSMX/oAreyI3bLtgiiVU0yyzQz2j+HzX64n0ZBq V/cEloMP/dHWRoKQsS2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntSGq-007ijH-Kb; Tue, 24 May 2022 11:00:12 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntSGn-007iiu-4H for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2022 11:00:10 +0000 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 5CDBA1FB; Tue, 24 May 2022 04:00:05 -0700 (PDT) Received: from bogus (unknown [10.57.66.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D79833F73D; Tue, 24 May 2022 04:00:01 -0700 (PDT) Date: Tue, 24 May 2022 11:59:53 +0100 From: Sudeep Holla To: Gavin Shan Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rafael@kernel.org, Jonathan.Cameron@huawei.com, drjones@redhat.com, zhenyzha@redhat.com, shan.gavin@gmail.com Subject: Re: [PATCH] arch_topology: Limit threads to one specific cluster Message-ID: <20220524105953.uhpgly4qkbvc2ayz@bogus> References: <20220524081212.1363105-1-gshan@redhat.com> <20220524085157.o3ie6hjy3tg5of5y@bogus> <7cc4eef4-bdb6-bd53-450b-f2348f722cf5@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7cc4eef4-bdb6-bd53-450b-f2348f722cf5@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220524_040009_259663_2A896FA6 X-CRM114-Status: GOOD ( 23.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 24, 2022 at 05:05:22PM +0800, Gavin Shan wrote: > Hi Sudeep, > > On 5/24/22 4:51 PM, Sudeep Holla wrote: > > On Tue, May 24, 2022 at 04:12:12PM +0800, Gavin Shan wrote: > > > The sibling information for one particular CPU is updated after ACPI > > > PPTT table is parsed. struct cpu_topology::thread_sibling tracks the > > > the CPUs in same core. However, cluster isn't considered when it's > > > populated. In this case, multiple threads belonging to different > > > clusters can be put together through the sibling information. It > > > eventually leads to unexpected warning from sched subsystem. > > > > > > For example, the following warning is observed in a VM where we have > > > 2 sockets, 4 clusters, 8 cores and 16 threads and the CPU topology > > > is populated as below. > > > > > > CPU Socket-ID Cluster-ID Core-ID Thread-ID > > > ---------------------------------------------- > > > 0 0 0 0 0 > > > 1 0 0 0 1 > > > 2 0 0 1 0 > > > 3 0 0 1 1 > > > 4 0 1 0 0 > > > 5 0 1 0 1 > > > 6 0 1 1 0 > > > 7 0 1 1 1 > > > 8 1 0 0 0 > > > 9 1 0 0 1 > > > 10 1 0 1 0 > > > 11 1 0 1 1 > > > 12 1 1 0 0 > > > 13 1 1 0 1 > > > 14 1 1 1 0 > > > 15 1 1 1 1 > > > > > > [ 0.592181] CPU: All CPU(s) started at EL1 > > > [ 0.593766] alternatives: patching kernel code > > > [ 0.595890] BUG: arch topology borken > > > [ 0.597210] the SMT domain not a subset of the CLS domain > > > [ 0.599286] child=0-1,4-5 sd=0-3 > > > > > > # cat /sys/devices/system/cpu/cpu0/topology/cluster_cpus_list > > > 0-3 > > > # cat /sys/devices/system/cpu/cpu0/topology/thread_siblings_list > > > 0-1,4-5 > > > > > > This fixes the issue by limiting threads to one specific cluster. > > > With this applied, the unexpected warning disappears in the VM. > > > > > > > I have similar fix but as part of bigger series[1] to get DT support in > > line with ACPI. > > > > Your patch resolves the issue I have. So please ignore mine. Sorry Thanks for that. > for the noise. > No worries, definitely not noise. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel