Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1339493pxb; Wed, 2 Feb 2022 02:42:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPxNJedZRV6FVV9K7K+X5NRa5vS7dj03o6j0EMNcVUeFBRiLi3uiNx+XWxvxYMApFOMY/e X-Received: by 2002:a17:902:dacd:: with SMTP id q13mr30465078plx.168.1643798538275; Wed, 02 Feb 2022 02:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643798538; cv=none; d=google.com; s=arc-20160816; b=p36Fsvd5AQrwLBm8N7/hQF4xGJwW00Sl1Sy8XLU/Iu0zhmezdfg4XBfhrwnsNG687J mB8qHdt/kEYXDnlPVF/RNaQ/8nwUXBRNS/XpRBmFFZmgDdrFFz5tk7ArmYWKyQrmxSeX 8QxrrmxApZUwoyo+I3i+CUW7906uM46ZpCECTx8QPZ8/lnqSR4b/7DV5/DIgAWykkIEj y0pgVyjsUAjJ6NlNQfqTMdt4eQxy9SVW+THCsSpfZY9hJpspqs8UrXnlM9Has47uaxsO P8TP+A/XxPhVW9pIp2bBgL3WRvqXj0ttZJ9uaIlIW1xq82CQlyq3zxz8mvHfdWJ1r2PX HPhg== 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=1rSMPibeU2/x9y1HGJmwIBX0MF6r0zdDZVn4ZSeYeqM=; b=fplceHUwEeB0gbrRaeP6Dld1/SAvpPd4j7zVqFW7EM2QvjCNS/JH+tvIbiZgySftyC 3GMDiXHGc68K505Ef2TESp/CdG0jMOcJ6/bE32JnzxuPj/nFpn3DZdt9AZeIdiM4gsiw yMenk+TORKGL3Tw+PGFokv/0/ycPW6z0OnJrxNxBWs7onP6ApXgXJndBLvBgZYDivuig 8Z5qiK31qtTxFw/521uX4ofnTG77PQHPmr0YcTm+Jtbhltb+s7G2Z82YOr0CSf8RFxcn DW71jrJt5NBeyurFlz7qTm/thoOnHlVxWi8CFikFTKbIjR5wGDV2ES53DLhJExR8Qe5g TPug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BTJtMh/m"; 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 o12si21105898plg.212.2022.02.02.02.42.06; Wed, 02 Feb 2022 02:42:18 -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="BTJtMh/m"; 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 S236480AbiBAKRK (ORCPT + 99 others); Tue, 1 Feb 2022 05:17:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:20840 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbiBAKRG (ORCPT ); Tue, 1 Feb 2022 05:17:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643710626; 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=1rSMPibeU2/x9y1HGJmwIBX0MF6r0zdDZVn4ZSeYeqM=; b=BTJtMh/m9wI877MoJHJo8Ss1XH0a7PwVHOmxVkpkHjrxvMdSxPzz8ZscqYEXV3uEF4h7Nq JAbfc3pvCb0vO5IAiObiWenIWaQN7vCjMmb1ZSrYmeQUVRkIqULicGCQjO5sN+tCZd7zD+ 9kExqb8KeIhBd1T5B10BbJPp9h+gTdo= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-387-rMqAFGMVOByj6IlDyHX5Bg-1; Tue, 01 Feb 2022 05:17:05 -0500 X-MC-Unique: rMqAFGMVOByj6IlDyHX5Bg-1 Received: by mail-wr1-f71.google.com with SMTP id c10-20020adfa30a000000b001d79c73b64bso5848567wrb.1 for ; Tue, 01 Feb 2022 02:17:05 -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=1rSMPibeU2/x9y1HGJmwIBX0MF6r0zdDZVn4ZSeYeqM=; b=1pzDdc8O3LgjWiX288zkMCER0+V3GFRX2K6HkM48xtwPoPGgtAsvMpcvm8553sOs+9 kvrErsQNK5f+UKz5IOd6p91abNBKK0pd1RhkJQZKPzozMMZ+wwW6jLyp3ungKhtERaUm rvcJZstPDTAY33UE0D8D4bDeAk+VcUW2/MI1IQwwnislrcRvHu1TPJnB/h0g+W6VPpjH T//ELWkehtf87YBX5fZBzkYCdXgu3owTZLypb71qWUoXU4Jo7ONNI7t5izBWRneR/D25 MVlLVRHl9w2AFKIe+Ky15m9m2mG2Jwm0O8s95gW/EbcLYtTX8uB8QNNVgBe4Wh28mhYf 5/pQ== X-Gm-Message-State: AOAM531SYMgwKHlrxTYz3RNTTUyDQ3qoIEl/nq0wd3yKXbT0fPCusa1v HMNporo2vpTHA0qDygM4mOaZOHethVgPrex5Zy0thicMOoRy7UoH5VeLL1Egs/INwPkQwzQlWfo sfr6mM5FUz6+8TMdJFJ8SD5+l X-Received: by 2002:adf:f54d:: with SMTP id j13mr20271536wrp.596.1643710624126; Tue, 01 Feb 2022 02:17:04 -0800 (PST) X-Received: by 2002:adf:f54d:: with SMTP id j13mr20271503wrp.596.1643710623856; Tue, 01 Feb 2022 02:17:03 -0800 (PST) Received: from ?IPV6:2003:cb:c711:ba00:67b6:a3ab:b0a8:9517? (p200300cbc711ba0067b6a3abb0a89517.dip0.t-ipconnect.de. [2003:cb:c711:ba00:67b6:a3ab:b0a8:9517]) by smtp.gmail.com with ESMTPSA id p2sm1600619wmc.33.2022.02.01.02.17.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Feb 2022 02:17:03 -0800 (PST) Message-ID: <19907f0c-4d83-4d85-4233-f4ee727574a0@redhat.com> Date: Tue, 1 Feb 2022 11:17:01 +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: 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> <3be2e20c-f0b9-c080-adf4-b0e17c046eb0@redhat.com> <20220131094041.GA15392@linux> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220131094041.GA15392@linux> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31.01.22 10:40, Oscar Salvador wrote: > On Mon, Jan 31, 2022 at 08:48:54AM +0100, David Hildenbrand wrote: >> Hi Oscar, > > Hi David :-), > >> 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. > > Yeah, I wanted to check where exactly did we mark the nodes online, > and for the few architectures I checked it happens in setup_arch(), > which is called very early in start_kernel(), while driver_init() > gets called through arch_call_rest_init(), which happens at the end > of the function. > > I am not sure whether we want to remark that somehow in the changelog, > so it is crystal clear that by the time the node_dev_init() gets called, > we already set the nodes online. > > Anyway, just saying, but is fine as is. I'll adjust the first paragraph to: ... 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: early during boot, arch code determines node and zone ranges and sets the relevant nodes online; usually this happens in setup_arch(). Thanks! -- Thanks, David / dhildenb