From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF60CC433EF for ; Fri, 20 May 2022 14:36:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350335AbiETOgb (ORCPT ); Fri, 20 May 2022 10:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348785AbiETOgY (ORCPT ); Fri, 20 May 2022 10:36:24 -0400 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76BA57B30 for ; Fri, 20 May 2022 07:36:23 -0700 (PDT) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-e5e433d66dso10511152fac.5 for ; Fri, 20 May 2022 07:36:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iyg09MXx3MxUDrIc80FSkTauSbtXFvQYu5GaFcUD4A8=; b=6A/ZADbDOwV84hhjbq0VUFECjbAJ6n9rXYOhPXYnmVuYdV0+TYBj4xyxGEI8vBXHq5 G4KtzH+Ak1xhfjiBCMNmdQ+GAizmpGk3hg4KY4HH3gt/9vef1utHbc6h7BmN5prMLBiE WTagxyn0/05V2ETZl1KlacfQ1gtwe2fZfhYfzQDFrXOyxsg8v1Ukm1Pf8UndwhVAaO+O raaCxetI24HzGygLTt/fL15xFyyCmqFE5CbiwNInMizTTwr+xmM2HQZX1Q+5MwfxaKf0 9I1aWW0/FurcLam2XoJ3XYq6Xt04FlTwiPza5Zk1ggNPQ5tkXI5zvOmIIXoRtm8PwrZW /qeg== X-Gm-Message-State: AOAM532q4EK3/PwrfE952cb9WowRwoTXxKTwf6kX/ePYRBqlKEK+GJS+ UyF89Lz10xwZEjkQVqw92g== X-Google-Smtp-Source: ABdhPJyMUFH7t+iQryu0gI+MIfzU/pVaixAR4w3tzpu5naOonR9QLmz8Q4jg4oru81EwcHVye5wwIA== X-Received: by 2002:a05:6870:d60d:b0:f1:ddfc:2f26 with SMTP id a13-20020a056870d60d00b000f1ddfc2f26mr6255111oaq.296.1653057382154; Fri, 20 May 2022 07:36:22 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id p13-20020a0568301d4d00b0060603221236sm975958oth.6.2022.05.20.07.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 07:36:21 -0700 (PDT) Received: (nullmailer pid 3813862 invoked by uid 1000); Fri, 20 May 2022 14:36:20 -0000 Date: Fri, 20 May 2022 09:36:20 -0500 From: Rob Herring To: Sudeep Holla Cc: Atish Patra , "linux-kernel@vger.kernel.org" , Atish Patra , 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: <20220520143620.GA3788938-robh@kernel.org> References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> <20220520125959.wlxz53cfqldljxjy@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520125959.wlxz53cfqldljxjy@bogus> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > 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? > > It's not a unique problem as the DT unflattening and init code has to > > do the same thing. I'd assume the hotplug and cpu sysfs devices have > > to deal with the same thing. > > > > OK, I will take a look at how to do that. > > -- > Regards, > Sudeep From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12CB0C433F5 for ; Fri, 20 May 2022 14:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jq5eEsStWOnrkYTBM+OPISEhFjtWhid2HATMdO5YwM8=; b=chFKrCYRjc3nFg AUBSrq6v8PUlXE+BUobUlfgE4wWeA42EAK+yOpEZpGNuVHGsTL8yGhzkgus7Qq4lAxdWQOcsCGb/Y XcvQcVGZGR1Qj4h7BZgBN9BmL88zDDWArqoV9nVSjuGakGfl/9+bO3St6YdAA07PoAtWtAb7bYdVa UtgSiY88OdKTPpcDqKiVWCv8p0x/9h0IC9m107q1u9jQw211bdB2uZzg7WWuutIZLVKc7dVRPf+uW SoP/0fiRd/zDQAXgeLZf3djHzydjlKV2D/8bqFlm0EHwduTRS8Q72fKIhwGW0UJ4JOvooq117k3DV CDN5ip5PpriTeZSbvb5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns3k4-00Cwk9-6i; Fri, 20 May 2022 14:36:36 +0000 Received: from mail-oa1-f50.google.com ([209.85.160.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns3jt-00Cwi2-0z; Fri, 20 May 2022 14:36:26 +0000 Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-f1d5464c48so10511502fac.6; Fri, 20 May 2022 07:36:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iyg09MXx3MxUDrIc80FSkTauSbtXFvQYu5GaFcUD4A8=; b=doYWivt85T94a8AuIMERpouI2l7IXGWmU7eeX4atOtMx96lEr/V3lX7OjBbDe8QCVR RxAEiRUTckydNWpYPlqJAVZhOwAj75Ka7WdWPI+2652MmZUbBPeBbVjjo9tV2iY+x6rg aMbg+RZX5m/Hdt6Nn6SYngVHI8D9bD4/qqeLS5UGOWUdMwkKQbeIlAfiMYjwmoZJ4X82 CqlZvCltZ1F98E1pfg4OJP/M7G4pcpIv0ElizZyB5We4F0MbDThoYClPBEbG2XOQEJK8 jf8UcvNMUZ39BggWs9XbvGARv9FoGLQycCS0Mc/nL+ICQTDUxYcFWdiTwmDB22aNikE+ E5ZQ== X-Gm-Message-State: AOAM533+4iBn2S9cBbbnnnjOWf/tBbRqVT9Qg644NKuC3Q/afNaM/Ds/ AOrB6Klyj9DooglGwvS9aA== X-Google-Smtp-Source: ABdhPJyMUFH7t+iQryu0gI+MIfzU/pVaixAR4w3tzpu5naOonR9QLmz8Q4jg4oru81EwcHVye5wwIA== X-Received: by 2002:a05:6870:d60d:b0:f1:ddfc:2f26 with SMTP id a13-20020a056870d60d00b000f1ddfc2f26mr6255111oaq.296.1653057382154; Fri, 20 May 2022 07:36:22 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id p13-20020a0568301d4d00b0060603221236sm975958oth.6.2022.05.20.07.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 07:36:21 -0700 (PDT) Received: (nullmailer pid 3813862 invoked by uid 1000); Fri, 20 May 2022 14:36:20 -0000 Date: Fri, 20 May 2022 09:36:20 -0500 From: Rob Herring To: Sudeep Holla Cc: Atish Patra , "linux-kernel@vger.kernel.org" , Atish Patra , 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: <20220520143620.GA3788938-robh@kernel.org> References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> <20220520125959.wlxz53cfqldljxjy@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220520125959.wlxz53cfqldljxjy@bogus> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_073625_109676_C917D3FF X-CRM114-Status: GOOD ( 31.18 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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. > > 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? > > It's not a unique problem as the DT unflattening and init code has to > > do the same thing. I'd assume the hotplug and cpu sysfs devices have > > to deal with the same thing. > > > > OK, I will take a look at how to do that. > > -- > Regards, > Sudeep _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96F92C433EF for ; Fri, 20 May 2022 14:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G6JLm65tGq+cTYM1Fl0XaQ1+aMaxVSr0/s14Uk5YAwc=; b=VwbqyaOtS0JO0r wu9b7gBt19+M/ZLU44nw146bTgDD0NexY506jhuf/QRWSVPuynNU4KAmGwAQRO9HQpS7n3aYlatgr W4YWwTblIGu78/lgj318R67SbfzFCPaVQd0b/U8eumVUrvJIc5seXQvq74/7iHuSbcwoGi6QH4OAi 0EODAu6msMcIX3AWfUoL2K3rET9PyJmr8NzVtXv6gWJc90DzcLfnTUd93XTonyuQ4UScXoGcQ5jqS 0hjN8f8YEbLreBgK74Gz7uVxXwOmD3ne7kGUyub0edWy5PkjQm9b1M18NtYQIx5l9wUv6iczTIOH1 MqAlq3c7KhSTVaBqH70g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns3jw-00Cwio-Ae; Fri, 20 May 2022 14:36:28 +0000 Received: from mail-oa1-f50.google.com ([209.85.160.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns3jt-00Cwi2-0z; Fri, 20 May 2022 14:36:26 +0000 Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-f1d5464c48so10511502fac.6; Fri, 20 May 2022 07:36:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iyg09MXx3MxUDrIc80FSkTauSbtXFvQYu5GaFcUD4A8=; b=doYWivt85T94a8AuIMERpouI2l7IXGWmU7eeX4atOtMx96lEr/V3lX7OjBbDe8QCVR RxAEiRUTckydNWpYPlqJAVZhOwAj75Ka7WdWPI+2652MmZUbBPeBbVjjo9tV2iY+x6rg aMbg+RZX5m/Hdt6Nn6SYngVHI8D9bD4/qqeLS5UGOWUdMwkKQbeIlAfiMYjwmoZJ4X82 CqlZvCltZ1F98E1pfg4OJP/M7G4pcpIv0ElizZyB5We4F0MbDThoYClPBEbG2XOQEJK8 jf8UcvNMUZ39BggWs9XbvGARv9FoGLQycCS0Mc/nL+ICQTDUxYcFWdiTwmDB22aNikE+ E5ZQ== X-Gm-Message-State: AOAM533+4iBn2S9cBbbnnnjOWf/tBbRqVT9Qg644NKuC3Q/afNaM/Ds/ AOrB6Klyj9DooglGwvS9aA== X-Google-Smtp-Source: ABdhPJyMUFH7t+iQryu0gI+MIfzU/pVaixAR4w3tzpu5naOonR9QLmz8Q4jg4oru81EwcHVye5wwIA== X-Received: by 2002:a05:6870:d60d:b0:f1:ddfc:2f26 with SMTP id a13-20020a056870d60d00b000f1ddfc2f26mr6255111oaq.296.1653057382154; Fri, 20 May 2022 07:36:22 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id p13-20020a0568301d4d00b0060603221236sm975958oth.6.2022.05.20.07.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 07:36:21 -0700 (PDT) Received: (nullmailer pid 3813862 invoked by uid 1000); Fri, 20 May 2022 14:36:20 -0000 Date: Fri, 20 May 2022 09:36:20 -0500 From: Rob Herring To: Sudeep Holla Cc: Atish Patra , "linux-kernel@vger.kernel.org" , Atish Patra , 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: <20220520143620.GA3788938-robh@kernel.org> References: <20220518093325.2070336-1-sudeep.holla@arm.com> <20220518093325.2070336-9-sudeep.holla@arm.com> <20220520125959.wlxz53cfqldljxjy@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220520125959.wlxz53cfqldljxjy@bogus> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_073625_109676_C917D3FF X-CRM114-Status: GOOD ( 31.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > > 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? > > It's not a unique problem as the DT unflattening and init code has to > > do the same thing. I'd assume the hotplug and cpu sysfs devices have > > to deal with the same thing. > > > > OK, I will take a look at how to do that. > > -- > Regards, > Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel