Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1589456pxb; Wed, 2 Feb 2022 08:12:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPIsuzaUSikHQbXyflOthEPwNzPYeBXdgFD8cD8gbvmHJY2G3YLJUQcMVNT54iAeUGO3Xr X-Received: by 2002:a05:6a00:158e:: with SMTP id u14mr22292837pfk.38.1643818378675; Wed, 02 Feb 2022 08:12:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643818378; cv=none; d=google.com; s=arc-20160816; b=eRe8UAfqGuq+6k4sp6Nb972vRYvj8c2BTW8q48UisbYLgm/d8E8N2V3B/Exmbd534L XUAx5J90tce2ZzizobjMkGvV3PMtCOI9R0BKFEJmKOXGSwz4REsXLyYMaUV/aTPl+6/U LRDUk1SPNTiboTTS9+UDNTUaTWEZRazpnd5jPU+0rAVhXaaGzdMUuJyaXnkwg0QoS2FQ hVmhUYbzDxOSXqEQx6L7hE63+ILuT9r5lO9bpPILiHfuzTvTaaiOxZoMS9/dWCfbm7Fs lpddYNmjRq7QUC74xK1V8zYKFjG5hqPEhWQQy8T0feTLsXqz6pSpHHTLAoqw3It+semS VAuw== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=YxruncnGKSYEtQADjLUNkNWhCcGBbzpK2sbDwkeQUpo=; b=ABVUMJGszVUj8KCIceY4/72MdyB7khhsgoemCQqeRamCn3uj5bkdkz0xdCtkn2lt/r dvurJGloKDFzgWicdXQZN0w2ZiXZgd1O32T4wFwQjnHScM7qSbaGu2kZZnVd8mWywLl3 dGuQ25br9SLMoWdgeeBpObV+NxQMA/TivrNFaCYbPeDsbmgB8WAjXFVP4CpM29m6t9pn Cl1Rs0gVdvN1dlWTuaOtuBI7zQRo5McA4h98XZo9NWZuKOdGyzU6yPCCpb8C/s8JiK1F qXiYJGwkY7glE/m47wXBxFALIsFoP9Br/PKnn50zvzbmBndcrWYT/7ZHPTdyYGN+Adby Ba+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IvlHLOIo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10si21461266pfk.192.2022.02.02.08.12.46; Wed, 02 Feb 2022 08:12:58 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IvlHLOIo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235061AbiBBNp5 (ORCPT + 99 others); Wed, 2 Feb 2022 08:45:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24499 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344407AbiBBNpz (ORCPT ); Wed, 2 Feb 2022 08:45:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643809555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YxruncnGKSYEtQADjLUNkNWhCcGBbzpK2sbDwkeQUpo=; b=IvlHLOIoAfjxqUryG5VtmgReaCtzLoMtgEAAKndnl8Lqi914pDdVatgXRntOsQovBp53GE EyeC3I9hFv8V8pRcIotB0VS/+D0GazCr7QtuFhOA16z9du7/fUdOXcleb1D3uDxp0yBjcv uKzYQh460kzzs7wa0ybeaECp/Y3LALQ= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-644-e6DPzP5KP7OroaGbcJ6G9A-1; Wed, 02 Feb 2022 08:45:54 -0500 X-MC-Unique: e6DPzP5KP7OroaGbcJ6G9A-1 Received: by mail-ed1-f70.google.com with SMTP id k5-20020a508ac5000000b00408dec8390aso10335795edk.13 for ; Wed, 02 Feb 2022 05:45:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=YxruncnGKSYEtQADjLUNkNWhCcGBbzpK2sbDwkeQUpo=; b=lqaLDjb41dLoj72fDGU8Eths9BtxPY10QFPOE1iyI648SaF69SXL9gUu3ufVuc84G4 8Wt5Z9Bo20l5bzBUpM6ILteAq+m1+ceMAqYxO9YL/SqJgH8fsXdS/R8uNoD7fd7Wf1n9 sw2X1Do7hkj3Bjp+lESo5rOaWsiw3HNaRMAWCQVWYQ8UESemSPkn6gzLST36bNsROq9/ DJFooq1YUIm+tF9WDteCa0qV4RXLwAhLrHkoQOqHxNtK+zj/0RK993PdEfehfWOljn8W YoN7rWDYAtDirYXmUnD0APEYgOnuIFicDnTC/tjHow2ig/C+RhIpBbyraRXP5qd9G++f q2UA== X-Gm-Message-State: AOAM532EBonuwgaO2ajwwIPfJ3kDTCLLW/QZJ1p8W76l6IUmiwJDmJp/ SyCeTj7ooayE7i68UKa6M0XS5poJxKP0XxHYjruvtmrRN52h0bZRRomUsIeaUeRVei+x4Od6fj6 u94uOC2lGTW8hMs4WqVPX+iut+xfPZfwCLauLuDvMR+hhZrbQkY1nLgC5gNvYA+dk0YQtwpIa X-Received: by 2002:a05:6402:5248:: with SMTP id t8mr30084298edd.14.1643809552919; Wed, 02 Feb 2022 05:45:52 -0800 (PST) X-Received: by 2002:a05:6402:5248:: with SMTP id t8mr30084241edd.14.1643809552570; Wed, 02 Feb 2022 05:45:52 -0800 (PST) Received: from ?IPV6:2003:cb:c709:f800:a55c:e484:3cd9:3632? (p200300cbc709f800a55ce4843cd93632.dip0.t-ipconnect.de. [2003:cb:c709:f800:a55c:e484:3cd9:3632]) by smtp.gmail.com with ESMTPSA id z8sm15746580ejc.151.2022.02.02.05.45.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Feb 2022 05:45:52 -0800 (PST) Message-ID: Date: Wed, 2 Feb 2022 14:45:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH RFC v1] drivers/base/node: consolidate node device subsystem initialization in node_dev_init() Content-Language: en-US To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Andrew Morton , Greg Kroah-Hartman , Michal Hocko , Oscar Salvador , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Yoshinori Sato , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "Rafael J. Wysocki" , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org References: <20220128151540.164759-1-david@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220128151540.164759-1-david@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.01.22 16:15, David Hildenbrand wrote: > ... and call node_dev_init() after memory_dev_init() from driver_init(), > so before any of the existing arch/subsys calls. All online nodes should > be known at that point. > > This is in line with memory_dev_init(), which initializes the memory > device subsystem and creates all memory block devices. > > Similar to memory_dev_init(), panic() if anything goes wrong, we don't > want to continue with such basic initialization errors. > > The important part is that node_dev_init() gets called after > memory_dev_init() and after cpu_dev_init(), but before any of the > relevant archs call register_cpu() to register the new cpu device under > the node device. The latter should be the case for the current users > of topology_init(). > > Cc: Andrew Morton > Cc: Greg Kroah-Hartman > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Thomas Bogendoerfer > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Paul Walmsley > Cc: Palmer Dabbelt > Cc: Albert Ou > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: "David S. Miller" > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: Dave Hansen > Cc: "Rafael J. Wysocki" > Cc: x86@kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-ia64@vger.kernel.org > Cc: linux-mips@vger.kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-s390@vger.kernel.org > Cc: linux-sh@vger.kernel.org > Cc: sparclinux@vger.kernel.org > Cc: linux-mm@kvack.org > Signed-off-by: David Hildenbrand If there are no further comments, then I'll resend as !RFC with a slightly extended patch description, testing at least under arm64 and ppc64 as they are relatively easy to test for me. -- Thanks, David / dhildenb