Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3124765pxu; Mon, 19 Oct 2020 04:47:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0VQ1gJdocUFSaMvsGsRr9KcISmtZ+2qTss7WUH7fu/tztoHGSZ/wHRdfWkOrBEzTnJMVW X-Received: by 2002:a50:9548:: with SMTP id v8mr17372527eda.115.1603108038245; Mon, 19 Oct 2020 04:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603108038; cv=none; d=google.com; s=arc-20160816; b=KD5WjbX5MlMCqgEfvFPX7Xv+Gb/acczPndCvTbK5uvsUW69gzDAfOFXxGuX40ZigyC sovzUuInExZ5jSWJ7Hr6c3PG1tbbPkssesrFKLpZAXq/y1GyclNyY9gzdzcaJP52Bbyd itDuyhpFq0H0q6P9Z5B/HeZVBnTdw07NuA87VLul8x5gp3cGqWwGfiWjJpuwmVzX1YcY 7zQGHObUqzCWBLBwMIf1fvXpegYhupmPJh6/ft8HSNdO7o7OwX+5fyodfKbdSvpqmwSS wMrBL71HV+YODacEMiqXSYsxopbI1ZRJS/R6MG3ksLBLiHrkwCLdXYtPqV0Lj7dJFOHm uR8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QTqxinLDqhGWunrGo2Vey4FANtKxhB0DhE5GYNhdIW4=; b=fcdG+711p3KO3tcaO6O0ijpvGxQkxQo7KnguOm2YdWWFKH6GXa8AOs6A5qp/b1Kv39 1A099P0bm1BUH3r4weNd/dvGEFDVU7cdkyhAD7jemnXO/BPklRqkgi0fYVKlN2Bl3PYB HaKvHmb7OFZmsTjOD0y2lOtAHpvw38fCfuqaR92qefrG3xBoTb42S1PbHHLwrrq4d4YL G6DQQV1Msdw6IZ6poY+vKZuZ9uIa90QN+R3dXMEZlvlgIW9SK/+ZjtTycmHRLVawCGZA MQBxGuAdVdMalqycj7fpYEVio7/RYZfNNnkwJElTiWv2lUuhWh1DMQUxkQ0IBSEQ1gaE Ne5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=ZoZkBMcd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p24si7433407edm.360.2020.10.19.04.46.56; Mon, 19 Oct 2020 04:47:18 -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; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=ZoZkBMcd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727269AbgJSKfk (ORCPT + 99 others); Mon, 19 Oct 2020 06:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727185AbgJSKfk (ORCPT ); Mon, 19 Oct 2020 06:35:40 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A52CCC0613CE; Mon, 19 Oct 2020 03:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QTqxinLDqhGWunrGo2Vey4FANtKxhB0DhE5GYNhdIW4=; b=ZoZkBMcdjYDk9LBlotaR87jlZI ULT1kDWsXnPuHoHbU5L4aN+aeV1NoBV8TvUqibfsdJlfaxDw6Ui7NzgWfiVAFYa7u0R3UT/rONj6+ XSj53jV3QqRcoiMw4lbRORN2Bl6VqWUWcTiBSzzLfOXDLv1xtKdnO26+WxeySnLhLJsqPE35LONhF SwV8iiieIwCLKT8C79ok4f2TyEH6ss36vWT2hF8ls5raovK8eCTy5iatJi1E4/aSIPTo/vT1Z+Q4N CkXDECbNHgXC4Jl1Kll4FsMdhg4IcmADmY4CRANwhXsrIzJB/1KPtKke65Y64jTe7FEyoDGAWci3A 0IxQyVSg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUSVi-0001Du-QW; Mon, 19 Oct 2020 10:35:26 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 200BC30411F; Mon, 19 Oct 2020 12:35:22 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0DED32214E421; Mon, 19 Oct 2020 12:35:22 +0200 (CEST) Date: Mon, 19 Oct 2020 12:35:22 +0200 From: Peter Zijlstra To: Jonathan Cameron Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, x86@kernel.org, Len Brown , Greg Kroah-Hartman , Sudeep Holla , guohanjun@huawei.com, Will Deacon , linuxarm@huawei.com, Brice Goglin , valentin.schneider@arm.com Subject: Re: [RFC PATCH] topology: Represent clusters of CPUs within a die. Message-ID: <20201019103522.GK2628@hirez.programming.kicks-ass.net> References: <20201016152702.1513592-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201016152702.1513592-1-Jonathan.Cameron@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 16, 2020 at 11:27:02PM +0800, Jonathan Cameron wrote: > Both ACPI and DT provide the ability to describe additional layers of > topology between that of individual cores and higher level constructs > such as the level at which the last level cache is shared. > In ACPI this can be represented in PPTT as a Processor Hierarchy > Node Structure [1] that is the parent of the CPU cores and in turn > has a parent Processor Hierarchy Nodes Structure representing > a higher level of topology. > > For example Kunpeng 920 has clusters of 4 CPUs. These do not share > any cache resources, but the interconnect topology is such that > the cost to transfer ownership of a cacheline between CPUs within > a cluster is lower than between CPUs in different clusters on the same > die. Hence, it can make sense to deliberately schedule threads > sharing data to a single cluster. > > This patch simply exposes this information to userspace libraries > like hwloc by providing cluster_cpus and related sysfs attributes. > PoC of HWLOC support at [2]. > > Note this patch only handle the ACPI case. > > Special consideration is needed for SMT processors, where it is > necessary to move 2 levels up the hierarchy from the leaf nodes > (thus skipping the processor core level). I'm confused by all of this. The core level is exactly what you seem to want.