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 03E3BC433F5 for ; Mon, 31 Jan 2022 07:50:33 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0b6d9cbPk1fd8/7BrazpAhkcpXq08hPzfxj5RbcEtAk=; b=Fx+53oR9cKcmpN UjuXvTb8iV8x/sslYGAUzLp+cvhXzaH+Gc1Iwx7OIBhunsGI8rZYzuFXu4DYC4jTusYeeEAFYfjbG OMv8WFTV47vjoOLjt+YoAWW/fdtCzgw23zyS9w7EEfBHZXXjJOmwCBO4tLXsje7t+bUvGkHyvRQTa S1/bxnuK8i77nn/0Kcxd2vCRwUC12WnFCKiuQxTzIwFGTRl4VqQoBUASwoGo28uKPf0KkxIkKKZM3 BgcO34kByH7UiAfNr+9O6xdT0IScCKhG/osmgztpzypu0L6/XDoVfbTTvuqRFRPIonboa5vjFyiwK 8qgjjlaQVxg+ZtVgZBxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nERQy-008JUD-Ad; Mon, 31 Jan 2022 07:49:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nERQs-008JRe-Sy for linux-arm-kernel@lists.infradead.org; Mon, 31 Jan 2022 07:49:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643615340; 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=ZAt16hzi0jARVC2SH2tfH/9B/mqcxkzoEuuB90n1AMk=; b=DLNgAquRIbUZTcV6FsD5ygfGUQ5xtsO4FBrARcgfAJzBD3fJ8B+VGw/YqlADGy9tt7PXZp 7efpEfocNzPCn2ioe1ow3QnAT2/he84B3OcuQaGMgdXoqL+vYrHpVQ1M7G4OPLl0qDDlbB sOq6wP8BgOlE2DOgLUmJ/UtqfL5HQhw= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-YNXx8adJM86-vFiT7mdVBw-1; Mon, 31 Jan 2022 02:48:58 -0500 X-MC-Unique: YNXx8adJM86-vFiT7mdVBw-1 Received: by mail-wm1-f72.google.com with SMTP id ay8-20020a05600c1e0800b00350de81da56so2648439wmb.9 for ; Sun, 30 Jan 2022 23:48:58 -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=ZAt16hzi0jARVC2SH2tfH/9B/mqcxkzoEuuB90n1AMk=; b=Vdfo+Cw1sn7EV6S7yMuhASEv5wiJGIYwFrSTLLkjXmJ1Y1qgpBI4LxTbCxOp9xe3fb CbNKAyW2mTOXXMU7mX8lFXKmAwfOM79znbohfNsTHJi5p0/HaOdmoA19z6CFQuQK9rJJ cesys+MQihhVns6e2WOmpI05uJ2CBLb0c0QVpN1oapCgFuZQYJVH05lkoYRYqfos1d4L Xpir77w9zWppCMNB55iYWnCWsCpqWom/sW881DBg1QWgK/rrWmHLYTMa7GnlI0mVXabX l71dUimrP6ayuK4Gm44DVJS2FLSgsxDlSw+vXdNrgLpHQSHWRJhZv25GKveYWBuutSvC rG1A== X-Gm-Message-State: AOAM532A0L1ts9WdGU/tNZoxiu+vJc7lNMyORvsG79/ThXAnRNt3K5Fk W7UExc0oSzLphxVu+4gG2xJ9BVVY3ODl8AAtd9x2xacJl2LOJjXO13m+0mzJty+Be5UguquNdYJ Dhv/Sl4m5yxZr7DTaVqoER49zlFOI+QYNvZk= X-Received: by 2002:a05:6000:1008:: with SMTP id a8mr15911209wrx.563.1643615337650; Sun, 30 Jan 2022 23:48:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJziNLNeLdU3x1hO5PuIt8mvz7fg18Pv6lGvSgHdK7fS7xha3a7EYrVkbUytI3CwE4ViZc3ZTg== X-Received: by 2002:a05:6000:1008:: with SMTP id a8mr15911171wrx.563.1643615337390; Sun, 30 Jan 2022 23:48:57 -0800 (PST) Received: from ?IPV6:2003:cb:c709:b200:f007:5a26:32e7:8ef5? (p200300cbc709b200f0075a2632e78ef5.dip0.t-ipconnect.de. [2003:cb:c709:b200:f007:5a26:32e7:8ef5]) by smtp.gmail.com with ESMTPSA id y6sm5081791wrl.46.2022.01.30.23.48.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Jan 2022 23:48:56 -0800 (PST) Message-ID: <3be2e20c-f0b9-c080-adf4-b0e17c046eb0@redhat.com> Date: Mon, 31 Jan 2022 08:48:54 +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() To: Oscar Salvador Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Greg Kroah-Hartman , Michal Hocko , 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: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220130_234903_084927_909FCEBA X-CRM114-Status: GOOD ( 22.88 ) 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 31.01.22 07:23, Oscar Salvador wrote: > On Fri, Jan 28, 2022 at 04:15:40PM +0100, 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(). > Hi Oscar, > So, before this change we had something like this: > > do_basic_setup > driver_init > memory_dev_init > do_init_calls > ... > topology_init > register_nodes/register_one_node > > And after the patch all happens in driver_init() > > driver_init > memory_dev_init > node_dev_init > > I guess this is fine as we do not have any ordering problems (aka: none > of the functions we used to call before expect the nodes not to be > there for some weird reason). > > So, no functional change, right? > Right, and the idea is that the online state of nodes (+ node/zone ranges) already has to be known at that point in time, because otherwise, we'd be in bigger trouble. Thanks! -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel