Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp218347imw; Fri, 8 Jul 2022 01:25:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vJ6+OYum19I/ZU9XMJFHZ8yGkTPHEalabSYY87XgcrRYDVucAnoxgRLGfxLghQdzVOK1NK X-Received: by 2002:a17:90a:e7c6:b0:1ee:fed1:60a4 with SMTP id kb6-20020a17090ae7c600b001eefed160a4mr10236010pjb.100.1657268757659; Fri, 08 Jul 2022 01:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657268757; cv=none; d=google.com; s=arc-20160816; b=FEDfdb+vxm7GexkfXJPNIsJLc+X5Lq15KSN+XU8YaG6tDbGZm2cVXhVHCof07fJz+x 5n3Wt8xKNyr8YuuncJ11C+7aRSpftHb4ltsLt8wijN1bP0tInSNy4CbPAjVehxRhTPRN YPMsLLryClsP7xuGK8+0o+zrCX02B/ce8QfP/PXSlgUEYUBDPiEWQF/peEYR1tmHXwTn MDYeElUedYa2c9Xh+1xt7Gpdsnyex/c/v2rXYsfIxEW1Cm0SsT3zxXhsBfAR0KhAGk12 j6mAgA8veJZGLkOKdsATHm3S6yV9r4hi3DA/TjZBBBYmfz91uaT4v20FD0meY8nFZXOa iYrg== 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=3aAwyjag7gVr0pWy5z+UgJJ+HGCK9w0n6h1FP3V74is=; b=it+u+6hcDHmcUB9yNlSmRbJ+FKFTr8WEBlzqWfbU7n163qThilqJsuSUhviHNJ5HFB FHrdCLG3dxKPFQarAOS5+PrOiDgiPumOY9nDzBzyu3mnl2vNSF5zaz2OY5ys7FJ+H65j xAzOBeBChA0X8MV6rY+/0rTuYZQMR5Nz6xcwfFXplHAXLVyV1hj6A+8QKBquK2Qk1kEJ 3PkO2d0mYG/hykQ2mj/2gpq0WZLJoe7sKr2BxcZgWStT9Mmr43JcOrQf2Bs8degXeXQa jteOXzBWPEHh0G1QQM9xwA0uqWimEGqeWXIlkMZc4wZm089Uhfbqj4XZLu/Hw+t714zj rZkw== 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 a13-20020a170902b58d00b0016c20ceec07si2554357pls.490.2022.07.08.01.25.45; Fri, 08 Jul 2022 01:25:57 -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 S237635AbiGHIFn (ORCPT + 99 others); Fri, 8 Jul 2022 04:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237549AbiGHIFj (ORCPT ); Fri, 8 Jul 2022 04:05:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC3DD80488 for ; Fri, 8 Jul 2022 01:05:38 -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 BD9CE1063; Fri, 8 Jul 2022 01:05:38 -0700 (PDT) Received: from bogus (unknown [10.57.39.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 989E93F792; Fri, 8 Jul 2022 01:05:35 -0700 (PDT) Date: Fri, 8 Jul 2022 09:04:24 +0100 From: Sudeep Holla To: Darren Hart Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , conor.dooley@microchip.com, valentina.fernandezalanis@microchip.com, Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Ionela Voinescu , Pierre Gondois , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v6 17/21] arch_topology: Limit span of cpu_clustergroup_mask() Message-ID: <20220708080424.22x2bgcbggb6skua@bogus> References: <20220704101605.1318280-1-sudeep.holla@arm.com> <20220704101605.1318280-18-sudeep.holla@arm.com> 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 Hi Darren, I will let Ionela or Dietmar cover some of the scheduler aspects as I don't have much knowledge in that area. On Thu, Jul 07, 2022 at 05:10:19PM -0700, Darren Hart wrote: > On Mon, Jul 04, 2022 at 11:16:01AM +0100, Sudeep Holla wrote: > > From: Ionela Voinescu > > Hi Sudeep and Ionela, > > > > > Currently the cluster identifier is not set on DT based platforms. > > The reset or default value is -1 for all the CPUs. Once we assign the > > cluster identifier values correctly, the cluster_sibling mask will be > > populated and returned by cpu_clustergroup_mask() to contribute in the > > creation of the CLS scheduling domain level, if SCHED_CLUSTER is > > enabled. > > > > To avoid topologies that will result in questionable or incorrect > > scheduling domains, impose restrictions regarding the span of clusters, > > Can you provide a specific example of a valid topology that results in > the wrong thing currently? > As a simple example, Juno with 2 clusters and L2 for each cluster. IIUC MC is preferred instead of CLS and both MC and CLS domains are exact match. > > > > While previously the scheduling domain builder code would have removed MC > > as redundant and kept CLS if SCHED_CLUSTER was enabled and the > > cpu_coregroup_mask() and cpu_clustergroup_mask() spanned the same CPUs, > > now CLS will be removed and MC kept. > > > > This is not desireable for all systems, particular those which don't > have an L3 but do share other resources - such as the snoop filter in > the case of the Ampere Altra. > > While not universally supported, we agreed in the discussion on the > above patch to allow systems to define clusters independently from the > L3 as an LLC since this is also independently defined in PPTT. > > Going back to my first comment - does this fix an existing system with a > valid topology? Yes as mentioned above Juno. > It's not clear to me what that would look like. The Ampere Altra presents > a cluster level in PPTT because that is the desireable topology for the > system. Absolutely wrong reason. It should present because the hardware is so, not because some OSPM desires something in someway. Sorry that's not how DT/ACPI is designed for. If 2 different OSPM desires different things, then one ACPI will not be sufficient. > If it's not desirable for another system to have the cluster topology - > shouldn't it not present that layer to the kernel in the first place? Absolutely 100% yes, it must present it if the hardware is designed so. No if or but. -- Regards, Sudeep