Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1248388iol; Fri, 10 Jun 2022 03:37:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFFln41iSGbMKVwAebuXecCDzzd49fL6Q13pL6BBC3KMnbLVs1HB2LIVHgG0dxu1iMdl6j X-Received: by 2002:a05:6402:17d0:b0:42d:ccc1:f4e4 with SMTP id s16-20020a05640217d000b0042dccc1f4e4mr50620025edy.150.1654857450076; Fri, 10 Jun 2022 03:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654857450; cv=none; d=google.com; s=arc-20160816; b=FKVIHKlryOJAn/++anrmDzvFfuwkE1Gca+n3tD7oJmJ3ePKQRNlrhMZ5BnhAauMUT8 wLZMaAlkCreNRDo7Pg9zd0Y8YBvW6CK0V2rGlllFXgWYgjdIT2wCT1dM8vaLe6eWUcGv w2zzfzmWNBkVl3nxX5OWEh3rAI2+NH9NvUYY8n21g+bBObimqFPz6Ikmc4bb0Yl2TzKD rb09kuzVuYsUZyQecJPQoYftx/w174w3CAM/bmKvTlRJH9MU+r7/S8sT3+pw8tHVWi7K CqkPOtrfeHHKeA7eDSu2wSTbD5IDaWcHOpfw0jT/6KL/YKn+KKchwaWfR3ERWoQ8PYHF 5Xxw== 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=OS720Fr/BEburbwqqb/14UcB/hjPQbt3jFfXQq5D+AY=; b=udlhGSx9gbFmJW0X2N4dqXRFHVWPQHYWlDFdKg9b1ze+elF/sjeK9P8IQ8mOwJbBog ig8F/YkTU31rYCvPNAl5Qr4pkbKH/lN8z9zmdGVjyaheUOKpnrXCMrklVfeacZcHjeN6 gnqaZJDMWwUpSYvfMvClmwt6odivi2hIoXKVrVcHG+iW0GMofQ0933eBw/xib4gL8wQz 3Ho21YXx/pP9fhf9lfH4VxOxIg/eGHBUD6tvIgHya9rzyxzEycY7e9v741BCPOePCh/I 45gw7L6GpdF4EMdbRRArYRtG3TdOY14fxTlFxtXM4RvCxoOzJxtpre57iAvGadh+awxQ 0/mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc3-20020a1709071c0300b0070da0ccb401si1627678ejc.574.2022.06.10.03.37.01; Fri, 10 Jun 2022 03:37:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1348472AbiFJK2L (ORCPT + 99 others); Fri, 10 Jun 2022 06:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344629AbiFJK2H (ORCPT ); Fri, 10 Jun 2022 06:28:07 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07A21DFB7 for ; Fri, 10 Jun 2022 03:27:59 -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 D2B6E12FC; Fri, 10 Jun 2022 03:27:58 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B5DFF3F766; Fri, 10 Jun 2022 03:27:56 -0700 (PDT) Date: Fri, 10 Jun 2022 11:27:53 +0100 From: Sudeep Holla To: Vincent Guittot Cc: Dietmar Eggemann , linux-kernel@vger.kernel.org, Atish Patra , Atish Patra , Sudeep Holla , Morten Rasmussen , Qing Wang , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Rob Herring Subject: Re: [PATCH v3 15/16] arch_topology: Set cluster identifier in each core/thread from /cpu-map Message-ID: <20220610102753.virkx47uyfsojol6@bogus> References: <20220525081416.3306043-10-sudeep.holla@arm.com> <20220525081416.3306043-11-sudeep.holla@arm.com> <20220525081416.3306043-12-sudeep.holla@arm.com> <20220525081416.3306043-13-sudeep.holla@arm.com> <20220525081416.3306043-14-sudeep.holla@arm.com> <20220525081416.3306043-15-sudeep.holla@arm.com> <20220525081416.3306043-16-sudeep.holla@arm.com> <947470ba-35fc-3c72-d01b-c0a7337216a2@arm.com> <20220606102159.dduxmvq4m2fm6gks@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Jun 10, 2022 at 12:08:44PM +0200, Vincent Guittot wrote: > On Mon, 6 Jun 2022 at 12:22, Sudeep Holla wrote: > > [...] > > Why ? Are you suggesting that we shouldn't present the hardware cluster > > to the topology because of the above reason ? If so, sorry that is not a > > valid reason. We could add login to return NULL or appropriate value > > needed in cpu_clustergroup_mask id it matches MC level mask if we can't > > deal that in generic scheduler code. But the topology code can't be > > compromised for that reason as it is user visible. > > I tend to agree with Dietmar. The legacy use of cluster node in DT > refers to the dynamiQ or legacy b.L cluster which is also aligned to > the LLC and the MC scheduling level. The new cluster level that has > been introduced recently does not target this level but some > intermediate levels either inside like for the kupeng920 or the v9 > complex or outside like for the ampere altra. So I would say that > there is one cluster node level in DT that refers to the same MC/LLC > level and only an additional child/parent cluster node should be used > to fill the clustergroup_mask. > Again I completely disagree. Let us look at the problems separately. The hardware topology that some of the tools like lscpu and lstopo expects what the hardware looks like and not the scheduler's view of the hardware. So the topology masks that gets exposed to the user-space needs fixing even today. I have reports from various tooling people about the same. E.g. Juno getting exposed as dual socket system is utter non-sense. Yes scheduler uses most of the topology masks as is but that is not a must. There are these *group_mask functions that can implement what scheduler needs to be fed. I am not sure why the 2 issues are getting mixed up and that is the main reason why I jumped into this to make sure the topology masks are not tampered based on the way it needs to be used for scheduler. Both ACPI and DT on a platform must present exact same hardware topology to the user-space, there is no space for argument there. > IIUC, we don't describe the dynamiQ level in ACPI which uses cache > topology instead to define cpu_coregroup_mask whereas DT described the > dynamiQ instead of using cache topology. If you use cache topology > now, then you should skip the dynamiQ > Yes, unless someone can work out a binding to represent that and convince DT maintainers ;). > Finally, even if CLS and MC have the same scheduling behavior for now, > they might ends up with different scheduling properties which would > mean that replacing MC level by CLS one for current SoC would become > wrong > Again as I mentioned to Dietmar, that is something we can and must deal with in those *group_mask and not expect topology mask to be altered to meet CLS/MC or whatever sched domains needs. Sorry, that is my strong opinion as the topology is already user-space visible and (tooling) people are complaining that DT systems are broken and doesn't match ACPI systems. So unless someone gives me non-scheduler and topology specific reasons to change that, sorry but my opinion on this matter is not going to change ;). You will get this view of topology, find a way to manage with all those *group_mask functions. By the way it is already handled for ACPI systems, so if you are not happy with that, then that needs fixing as this change set just aligns the behaviour on similar ACPI system. So the Juno example is incorrect for the reason that the behaviour of scheduler there is different with DT and ACPI. -- Regards, Sudeep