Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4753978pxb; Tue, 5 Oct 2021 09:36:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaiDlHZG2Qu1tVgLBaZDNw5z6tRVubMwkSd72U2NqpMY2jiwEpu3shRTWN4bumAcfuMA9W X-Received: by 2002:a17:902:ab8c:b0:13a:22d1:88d with SMTP id f12-20020a170902ab8c00b0013a22d1088dmr6140787plr.33.1633451808500; Tue, 05 Oct 2021 09:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633451808; cv=none; d=google.com; s=arc-20160816; b=wXWI4h1tgMEw7WdW50Gipjg1l7+DTmk39nPIHOEfMgc0NFHSs47KedqvloKmO/xWR1 9Ex5jMMwFkMsyG231e0BtzD/9QQJINFs5HLvMpXpi4UvIMIWnEQwK+xBtp/VGpQDs1Hn osWzMvb3GO21LdWXZh6XzQp79UhWUecPuLugInZrn6/Uj8i/bNcUOYKIrjtdRXG8FGx5 N/eaXaiNj+u/g20/IqhiDEWo3fCneXgD2T0iIWw5/RYTnDJ82q+5uosDw1Yh9zANRTYT H9+zkM7AYZLZZjIXLgZgY7LVT8PTdjid9L8/Oc/2XprTv4JUQf5K/Yq0Y1708lBcLt+b IUHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=D2MEXJcQQ3jAYdRAaT8Qg8VDF9Njuhim2osqsH0BVgE=; b=Z1gfa/3Di8piYI66Emy1braGWaKcLq9VQEyG2zf3wQdn4TJ07S7hak9wyo69pHhB72 czHUBxxsG8WVJSA9o7WKHjUi2lME5gsBXEDF3v0Fg93nTm4hGLO1tuODTQm23gKE88Ic oRUMuqfI5Q14DxrGc8bd0S2kIQGAZ2RRElq/nmPIQuXwr94StlrMUpAJbKGPdOpWxTy6 GBuP5LiA/S6J1Y0huD1LCZqss4X98JWYUM6cuaevZc9/nK3eIufLE6KScxb6Jtjf7FJC TLK9rVxNr1/zLCJ529g/bygIHY0PfNbAdWuDRzjoCvaVDpBUCDQzyGC6UrDZPEn17NRc nKzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si23298333pgd.77.2021.10.05.09.36.35; Tue, 05 Oct 2021 09:36:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S236402AbhJEQgD (ORCPT + 99 others); Tue, 5 Oct 2021 12:36:03 -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-kernel@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.