Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1043902iob; Fri, 13 May 2022 20:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwExXHKycD/XXZa7QZyAf8H6BZegyHH4el99sijJQiXnR15xetZMTwDaesNpoc3a+XZIyS/ X-Received: by 2002:a05:6000:1d93:b0:20c:58f8:f530 with SMTP id bk19-20020a0560001d9300b0020c58f8f530mr6103675wrb.254.1652500289372; Fri, 13 May 2022 20:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652500289; cv=none; d=google.com; s=arc-20160816; b=zYwOq8IBkxqBSxGuhMWEeOfFxk0uZJAr4p4wq7v/OgIrWVRlRvenPMZNKH3gSFfV5D 5LlMb4cOGvFHEU/u3lZmFAbIFcKKeleM6QCEpZhb1U3MhPVJvounsvVU/M8eDoFqUc5v 38o2yqWydNMqlwYGSwx9/FKL99HVniN4fbg4SvOnSe7ZRGdZW19cU/t+HzcRs6kNL1mc f9DILbwaHQupGJxzvdJRUcM+EH+VWivD+5PvgiUdxEyu4JkfXyuz/gtNoSNE7PWNfcp5 oE/P2NSdKNR7pHTxQ0UHC+ZNnExpcCQEJ9midKxbDWceVsn1xtXHpitqYs56noAky0xy PTzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=pr9IpX0ZRFzZOsr7UeLPt6RhGH+KkIgkTOwNs61R/vg=; b=kKKMESvBkQOJsafLssgAQzttBkgMIkjn8PJiX4AcuM1Vtb7avI1ZDrRzCvTjYzMaZL VK88U+FpYlAyODFKvPTb1cydQJJeHgWmsOuLDGwhBtogevp24a0ffT8gwmJjPJQtePCa I80uMSLWWbgsKYKfvUh5/jj12jBqgzWDvuReqYh21gprnjDyaxS/22DEMYbZJzeLHsCj mI07uFK5RxnVJpjXScOYVn5OFHbdTzB1YWycRMcuZSVV2VPIRapITPXRxei/RAxBku5t r3mSzEHY+n/wH6qWUzT5wQWfgVTasEatgnsApWDQUAcZp0/NpktIy9cLSJOB8a6O0p/i 8fOw== 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 l9-20020a5d4109000000b0020af4f90acfsi3732204wrp.869.2022.05.13.20.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:51:29 -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 CECFE47BDF3; Fri, 13 May 2022 17:24:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379541AbiEMKmS (ORCPT + 99 others); Fri, 13 May 2022 06:42:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355554AbiEMKmO (ORCPT ); Fri, 13 May 2022 06:42:14 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AF39B66CA7 for ; Fri, 13 May 2022 03:42:13 -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 38320143D; Fri, 13 May 2022 03:42:13 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DD6253F5A1; Fri, 13 May 2022 03:42:11 -0700 (PDT) Message-ID: Date: Fri, 13 May 2022 12:42:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [RFC PATCH] arch_topology: Use llc_id instead of package_id Content-Language: en-US To: Sudeep Holla Cc: Qing Wang , Greg Kroah-Hartman , "Rafael J . Wysocki" , Vincent Guittot , Morten Rasmussen , linux-kernel@vger.kernel.org References: <20220513083400.343706-1-dietmar.eggemann@arm.com> <20220513090330.z25fwthekn4rjkwq@bogus> From: Dietmar Eggemann In-Reply-To: <20220513090330.z25fwthekn4rjkwq@bogus> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 13/05/2022 11:03, Sudeep Holla wrote: > On Fri, May 13, 2022 at 10:34:00AM +0200, Dietmar Eggemann wrote: [...] >> @@ -527,7 +528,8 @@ static int __init parse_core(struct device_node *core, int package_id, >> return -EINVAL; >> } >> >> - cpu_topology[cpu].package_id = package_id; >> + cpu_topology[cpu].package_id = 0; > > While the above looks good and matches with what I am attempting to do > as well ... > >> + cpu_topology[cpu].llc_id = llc_id; > > This looks wrong for simple reason that this is derived incorrectly from > the cpu-map while there is no guarantee that it matches the last level > cache ID on the system as we didn't parse the cache topology for this. > So I disagree with this change as it might conflict with the actual and > correct llc_id. It might not match the LLC, that's true. Something we have already today in Android for DynamIQ clusters with big/Little. People using 1. level clusters to group CPUs according to uArch. My point is we manage to get: SMT - cpu_smt_mask() CLS - cpu_clustergroup_mask() MC - cpu_coregroup_mask() DIE - cpu_cpu_mask() covered in ACPI with the cpu_topology[] structure and if we want CLS on DT we have to save cluster_id for the 2. level (DT) cluster. And that's why I proposed to (ab)use llc_id to form the MC mask. I'm not currently aware of another solution to get CLS somehow elegantly into a DT system.