Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp985565iob; Fri, 13 May 2022 18:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+jCNaknQ/mUIMo2vIJ7ARI7UMkNWobcFFw1j1eoK71zeRf33/tk+ZSzCcAkRdfFdy0bHd X-Received: by 2002:a7b:c202:0:b0:394:1e7d:af44 with SMTP id x2-20020a7bc202000000b003941e7daf44mr6817903wmi.139.1652492245060; Fri, 13 May 2022 18:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652492245; cv=none; d=google.com; s=arc-20160816; b=fqYmbhWg7ZITcWVld53UpKRs+3ZMiFTrHQQ9si0KsdIDHBcs6tji3PCsQTs4jEYrIR W37tH+b5Dkd+CzFnMqEvWwF5qVoR0fsSGMLSLhJpAm3Vtvf3TAjRIpz81wAghtwwuslw F86OlHznloBKVhlTGNnwQC9ggHBQMXwdhb63RMGK0xC6KY6HXojmjVtXFxwrr1dZm2D/ ZRhXDdH3EtwVzakdOLT2K6ybhw9mz1B7rtsoe7cpq4FpMH50PTy7jgr2Bp/kUVukKcS7 VV99Ru/q8w7zFQFJH8BnFm2tZtNbtQvMyceVNw2WBPyAh0Jzt8pWOA3YccxcqSjYL6se /TTA== 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; bh=tkRa9lrH8cs66a7xE4A7ubQHXeMegS2/reXYxcP8y8o=; b=PJ0u/Ea27wwiuTWapbtlmo0tAzcCiFciKUQQMzHXWnPqo/V/P5SYnzFFJIwKhYSctW WzEYD0Usb/Vjp5hWeRRcANYgvhECZLzgoK9hDw67Ipan8R05JsXFjfMnHzosqwtDTAjF LSg78yROSS3h6T1EQnrcCHiwTcvcKNLxcRwOW/zy1MmRobx+vVAWnr8QuyXAgGiSP4wH a3NpoejYh78dNf/O86fiuHRSBeTdthUhPx0L+iyQ7sVzO6GhKgpP2jmZwR19RAdzGMnm UV2aSb74qYbFjcbyPTXvhegwr+rqXB8RVyMoxI2pdsbGgHWtDPPF+hw+M3Ctb9O8/d3b YvTg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p18-20020a5d68d2000000b0020c7e230c8esi3207113wrw.285.2022.05.13.18.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:37:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 27D26416394; Fri, 13 May 2022 17:04:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378661AbiEMI4j (ORCPT + 99 others); Fri, 13 May 2022 04:56:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378300AbiEMI4e (ORCPT ); Fri, 13 May 2022 04:56:34 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5F9965DA7E for ; Fri, 13 May 2022 01:56:32 -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 35DFC113E; Fri, 13 May 2022 01:56:32 -0700 (PDT) Received: from bogus (unknown [10.57.65.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DB4993F73D; Fri, 13 May 2022 01:56:30 -0700 (PDT) Date: Fri, 13 May 2022 09:56:24 +0100 From: Sudeep Holla To: Dietmar Eggemann Cc: Qing Wang , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] arch_topology: support parsing cluster_id from DT Message-ID: <20220513085624.wnawifzi3nqhbuh3@bogus> References: <1652262776-3056-1-git-send-email-wangqing@vivo.com> <4b124aa9-ed26-a40b-8e74-81043d051247@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b124aa9-ed26-a40b-8e74-81043d051247@arm.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 13, 2022 at 10:36:26AM +0200, Dietmar Eggemann wrote: > On 12/05/2022 16:17, Sudeep Holla wrote: > > On Wed, May 11, 2022 at 02:52:56AM -0700, Qing Wang wrote: > >> From: Wang Qing > >> > >> Use nested cluster structures in DT to support describing multi-level > >> cluster topologies and increase the parsing of nested cluster. > >> > >> Notice: the clusters describing in DT currently are not physical > >> boundaries, since changing "cluster" to "socket" is too involved and error > >> prone, this patch will not have any effect on one-level cluster topo, but > >> can support the mutil-level cluster topo to support CLUSTER_SCHED. > > > > Sorry the socket/package_id is broken. If we are playing with cluster_id > > which is now wrongly presented as package_id, you are forced to fix that > > too. We don't want to break that in a different way or leave that as is > > since the cluster_id and package ids now show up as same now. Earlier the > > cluster_id was -1. > > We can leave package_id=0 (and maybe add socket parsing later) and use > llc_id instead. Like some Arm server do via ACPI. This will leave > cluster_id for Armv9 L2 sharing. cluster_id is also used in servers for > 2. level "clustering", e.g. Kunpeng920 L3-tags or Ampere Altra's SCU > boundaries. > OK I need to brush up my knowledge there. IIUC, the cluster id and llc_id are different and I don't believe you can mix them. There are platforms with system-wide(meaning including all the clusters) last level cache. This may break on those platforms. Also IIRC ACPI PPTT has both find_cpu_cluster and find_last_level_cache (names may differ as I haven't looked at the code) which are entirely different. They may be same on some platforms but the information source is definitely different. > This way we can achieve both. (1) not use package_id for cluster and (2) > have cluster_id available for 2. level cluster. > > I just send out a lightly tested RFC: > > https://lkml.kernel.org/r/20220513083400.343706-1-dietmar.eggemann@arm.com > OK, I will take a look, but llc_id and cluster_id are fundamentally different. Let me see what you have done in the patch exactly and comment there. -- Regards, Sudeep