Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1662370ioo; Sun, 22 May 2022 23:29:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtqbf7YlHEeA4r3b5kDPCn/l97AEVasz6wffgENv4HCbceN+5C0q6yRahGhTa0UUr68yrE X-Received: by 2002:a63:95:0:b0:3da:ec5a:141 with SMTP id 143-20020a630095000000b003daec5a0141mr18932919pga.480.1653287365683; Sun, 22 May 2022 23:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287365; cv=none; d=google.com; s=arc-20160816; b=Jl9AEuUi5B26b8gYFr6VJcrl4vQJ860Y7Hw/j67tWfZDhuDvm4pyignsWWtCr3/Y35 zODP8EtlzEtpqRl0zKCbqWw3tMvdUduudvSEFQYO5mA3aln/nRTvT0XLrJpU9gXRyjpH EdyhDcC2/VBEA19eSu1G3JGIJaXQI7b2ePU87uT19D5tRomUsFA+585VWNT8Ebz8qJ2S VGJLUeeMVD5D+QI6unNnf/mxCDqJpEA14W72yT0oYphyXifj1pcqRLlM+K02PTQ7zTWI JK+UymEBy/YCusVGUWY8XB5Fy1mrlIRLZISk9l30XCC3UwpLh4N6SwBmFrPJ9HStwqOi Wnag== 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=FbRR6mV1Hb+BLwxmqHE70eaZs0m8834VLQhO+AUdg6E=; b=G+Dt0K4hcehBp5n3sFN5tufU6AFRVWHxemHCF7PYqCmkyijw9IaJvY37PrG4EOL3WC KENDiishAJuCob7ZSrwVUazhq67iuDrv/j8UwuK3KHfY4bP2KJaX3ui8bSsX/JuAFlh2 o47UuI0SU0yMAeuZoNgfXwFNmnF8QATEF+JBHCeIPjKlYmbY2oz5/3kdvUF7W9BmZgHj pE99MGPzhoQwU8a13bLDHRgV1f9h1rOiaikXEMr2G00Y2+qkXy4dq5/hXyeGfA8W0ukc 6sZjLC6tZr6TbiPe/M2hpXWbOL4spe2JQz0azZPYF/oLxuwRhIw1SXfN0tnEXbsMVy/w +a6g== 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:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j36-20020a63fc24000000b0039908cd4e78si9583667pgi.263.2022.05.22.23.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:29:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 C33DC2250E; Sun, 22 May 2022 23:07:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350573AbiETPHG (ORCPT + 99 others); Fri, 20 May 2022 11:07:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345536AbiETPHE (ORCPT ); Fri, 20 May 2022 11:07:04 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E56486CF51 for ; Fri, 20 May 2022 08:07:01 -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 A884F1477; Fri, 20 May 2022 08:07:01 -0700 (PDT) Received: from bogus (unknown [10.57.66.157]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A4E6E3F73D; Fri, 20 May 2022 08:06:59 -0700 (PDT) Date: Fri, 20 May 2022 16:06:52 +0100 From: Sudeep Holla To: Rob Herring Cc: Atish Patra , "linux-kernel@vger.kernel.org" , Atish Patra , Sudeep Holla , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Qing Wang , linux-arm-kernel , linux-riscv Subject: Re: [PATCH v2 8/8] arch_topology: Add support to build llc_sibling on DT platforms Message-ID: <20220520150652.n6cfl7qpzbjrjh2f@bogus> References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> <20220520125959.wlxz53cfqldljxjy@bogus> <20220520143620.GA3788938-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520143620.GA3788938-robh@kernel.org> 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 20, 2022 at 09:36:20AM -0500, Rob Herring wrote: > On Fri, May 20, 2022 at 01:59:59PM +0100, Sudeep Holla wrote: > > On Thu, May 19, 2022 at 01:10:51PM -0500, Rob Herring wrote: > > > On Wed, May 18, 2022 at 4:34 AM Sudeep Holla wrote: > > > > > > > > ACPI PPTT provides cache identifiers and especially the last level cache > > > > identifier is used in obtaining last level cache siblings amongst CPUs. > > > > > > > > While we have the cpu map representing all the CPUs sharing last level > > > > cache in the cacheinfo driver, it is populated quite late in the boot > > > > while the information is needed to build scheduler domains quite early. > > > > > > Late is because it's a device_initcall() rather than late in the cpu > > > hotplug state machine, right? > > > > Right. The expectation is to run in on each online CPU in CPU hotplug state > > machine for some architectures. We may not need that on arm64 especially > > since we get all info from DT or ACPI, but e.g. x86 uses cpuid which needs > > to be executed on that CPU. > > That's a separate issue. I'm not suggesting changing that part (that > would just be an optimization). > > > > The late aspect is for sysfs presumably,but I think we could decouple that. > > > > OK, not sure when this sched_domain info is actually needed. It think it > > could be decoupled if we can wait until all the cpus are online. > > No need to wait for all cpus to be online. I think you keep doing > it as part of cpu hotplug. The device_initcall() is used because you > cannot have struct device or sysfs calls before the driver core is > initialized. If we run the cacheinfo code earlier (I think the arch code > will have to call it) just like the topology code and skip the sysfs > parts, then you can use it. > Yes I was thinking something on similar lines, though I didn't think of pushing code to arch. Let me check, must be possible. > > > Do all the firmware cache parsing early and then populate the sysfs parts > > > later. > > > > Yes that may work on DT/ACPI based systems, as I said x86 relies on cpuid. > > I'd assume using cpuid works at any time? > I think so, I can't recall the details since I looked at that about 5 years ago. I have to check again anyways to explore early initialisation. -- Regards, Sudeep