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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1C99C433FE for ; Tue, 5 Oct 2021 16:34:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88B1561409 for ; Tue, 5 Oct 2021 16:34:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236088AbhJEQgC (ORCPT ); Tue, 5 Oct 2021 12:36:02 -0400 Received: from foss.arm.com ([217.140.110.172]:42440 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbhJEQgC (ORCPT ); Tue, 5 Oct 2021 12:36:02 -0400 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 4E4406D; Tue, 5 Oct 2021 09:34:11 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F0733F766; Tue, 5 Oct 2021 09:34:07 -0700 (PDT) From: Valentin Schneider To: Barry Song <21cnbao@gmail.com>, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org Cc: aubrey.li@linux.intel.com, bp@alien8.de, bristot@redhat.com, bsegall@google.com, catalin.marinas@arm.com, gregkh@linuxfoundation.org, guodong.xu@linaro.org, hpa@zytor.com, jonathan.cameron@huawei.com, juri.lelli@redhat.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com, mark.rutland@arm.com, mgorman@suse.de, msys.mizuma@gmail.com, prime.zeng@hisilicon.com, rjw@rjwysocki.net, rostedt@goodmis.org, song.bao.hua@hisilicon.com, sudeep.holla@arm.com, tglx@linutronix.de, rafael@kernel.org, tim.c.chen@linux.intel.com, will@kernel.org, x86@kernel.org, yangyicong@huawei.com, Jonathan Cameron , Tian Tao Subject: Re: [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die In-Reply-To: <20210924085104.44806-2-21cnbao@gmail.com> References: <20210924085104.44806-1-21cnbao@gmail.com> <20210924085104.44806-2-21cnbao@gmail.com> Date: Tue, 05 Oct 2021 17:33:59 +0100 Message-ID: <87o883l9c8.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On 24/09/21 20:51, Barry Song wrote: > void update_siblings_masks(unsigned int cpuid) > { > struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; > @@ -617,6 +622,11 @@ void update_siblings_masks(unsigned int cpuid) > if (cpuid_topo->package_id != cpu_topo->package_id) > continue; > > + if (cpuid_topo->cluster_id == cpu_topo->cluster_id) { > + cpumask_set_cpu(cpu, &cpuid_topo->cluster_sibling); > + cpumask_set_cpu(cpuid, &cpu_topo->cluster_sibling); > + } > + Hm so without cluster information (e.g. DT system), we have ->cluster_id=-1, we'll essentially copy the package mask into the cluster mask. The exposed cluster mask is still <= package mask which is sensible. Are we fine with that, or do we need/want the mask to be empty in the -1 case? I'm guessing userspace tools should check for either id!=-1 or if the exclusive disjucntion of cluster vs package masks is non-empty. 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38D64C433F5 for ; Tue, 5 Oct 2021 16:36:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 02B8C61381 for ; Tue, 5 Oct 2021 16:36:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 02B8C61381 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sMpWEIDxMr5lrQ8QcunVZ5GtGX2a4aIV/KFuD964Lz8=; b=RDCzp+QQVfoosu mXhINFjnJhvXOcne5NBH08ycnF8C+PewoMOEuN2S4svTz/BZ+0pxfbYaU0IfjsrC7kIfopda8asDe 2rm6x69b5gtmQ5oUi3RRjKkyTqeFNAs4lGaDahQzbIIo++BfMj3NgLAB/iCXfHmgHiRK32a0RHpcb mRNpWw1KyKnQirBok41wVcjO979Rdim9CctAWScfnW02gTBikK+lEJxmvNjRjEh54hAXxqx/rX7iQ 79sDS4mmDFALEYXfem5zcI9m6cbT5maA6gRXWYVGQ1Oz/ZIz1gIQxzy9hwIM6Vcv0K24zy3zZJRxL 0JocXPFn4Mr7raM9qRDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXnOY-00BICS-Ue; Tue, 05 Oct 2021 16:34:23 +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 1mXnOV-00BIBj-Tj for linux-arm-kernel@lists.infradead.org; Tue, 05 Oct 2021 16:34:21 +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 4E4406D; Tue, 5 Oct 2021 09:34:11 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F0733F766; Tue, 5 Oct 2021 09:34:07 -0700 (PDT) From: Valentin Schneider To: Barry Song <21cnbao@gmail.com>, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org Cc: aubrey.li@linux.intel.com, bp@alien8.de, bristot@redhat.com, bsegall@google.com, catalin.marinas@arm.com, gregkh@linuxfoundation.org, guodong.xu@linaro.org, hpa@zytor.com, jonathan.cameron@huawei.com, juri.lelli@redhat.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com, mark.rutland@arm.com, mgorman@suse.de, msys.mizuma@gmail.com, prime.zeng@hisilicon.com, rjw@rjwysocki.net, rostedt@goodmis.org, song.bao.hua@hisilicon.com, sudeep.holla@arm.com, tglx@linutronix.de, rafael@kernel.org, tim.c.chen@linux.intel.com, will@kernel.org, x86@kernel.org, yangyicong@huawei.com, Jonathan Cameron , Tian Tao Subject: Re: [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die In-Reply-To: <20210924085104.44806-2-21cnbao@gmail.com> References: <20210924085104.44806-1-21cnbao@gmail.com> <20210924085104.44806-2-21cnbao@gmail.com> Date: Tue, 05 Oct 2021 17:33:59 +0100 Message-ID: <87o883l9c8.mognet@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_093420_033425_A3A60D48 X-CRM114-Status: UNSURE ( 6.75 ) X-CRM114-Notice: Please train this message. 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 24/09/21 20:51, Barry Song wrote: > void update_siblings_masks(unsigned int cpuid) > { > struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; > @@ -617,6 +622,11 @@ void update_siblings_masks(unsigned int cpuid) > if (cpuid_topo->package_id != cpu_topo->package_id) > continue; > > + if (cpuid_topo->cluster_id == cpu_topo->cluster_id) { > + cpumask_set_cpu(cpu, &cpuid_topo->cluster_sibling); > + cpumask_set_cpu(cpuid, &cpu_topo->cluster_sibling); > + } > + Hm so without cluster information (e.g. DT system), we have ->cluster_id=-1, we'll essentially copy the package mask into the cluster mask. The exposed cluster mask is still <= package mask which is sensible. Are we fine with that, or do we need/want the mask to be empty in the -1 case? I'm guessing userspace tools should check for either id!=-1 or if the exclusive disjucntion of cluster vs package masks is non-empty. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel