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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCC16C54FC9 for ; Tue, 21 Apr 2020 12:52:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A91FC2076C for ; Tue, 21 Apr 2020 12:52:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A91FC2076C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2A9098E0005; Tue, 21 Apr 2020 08:52:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 259138E0003; Tue, 21 Apr 2020 08:52:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 195B58E0005; Tue, 21 Apr 2020 08:52:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 0034B8E0003 for ; Tue, 21 Apr 2020 08:52:53 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B8496180AD817 for ; Tue, 21 Apr 2020 12:52:53 +0000 (UTC) X-FDA: 76731851826.04.ants34_5372d59a9b40f X-HE-Tag: ants34_5372d59a9b40f X-Filterd-Recvd-Size: 4099 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Apr 2020 12:52:53 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id s10so7197166wrr.0 for ; Tue, 21 Apr 2020 05:52:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wH+l3kjkV4M80pSfaf6tFiuhqXzQ05Et/uLXKnbO3F0=; b=ZKBKZ677SDVDb3Dazm4XqzsW3fouNCIlXGKb6KVx2D9DC5yW2yAW7EdVvge3GAPboj nDruH2wlZ0GIyc5qBHPMFVFYcGoTh64FW3LEQE5evMaCz8Mgr6TpbK3Y4tlwxnPVdY2X NnsXkFF7a0mYW8yt9fPgOkglo4ftfSPONl3Y/QFzM2YMhtjIZPFnQGEO3c5yaZlhLY7Z 1VENErQd6SclBonm1SDiXTyawepKCz4O6iQuLm1gQsY5Iyh5VwWxE+4XiWrOwT3kdFar UypapTHhIZVSvrECHRVLSWxiLfDPriJb70kXXPJj3wi7lr3EGHeEHIGS9s7qYV/QX/mF 3j8w== X-Gm-Message-State: AGi0PuZMU/sget6za5SGPHORD+aYVOuEZDCD17CRCFz5E0y6nSmPL++f KKR982sHqL5ZrpX5yllP+A8= X-Google-Smtp-Source: APiQypJK2DJznM4LBkwNiRARpy4QXbLWtusdChfPktwY+Si3C/BZwRW5C4+XrfnGFfZdOyFoMUQ86A== X-Received: by 2002:a5d:670c:: with SMTP id o12mr10344273wru.286.1587473572262; Tue, 21 Apr 2020 05:52:52 -0700 (PDT) Received: from localhost (ip-37-188-130-62.eurotel.cz. [37.188.130.62]) by smtp.gmail.com with ESMTPSA id u17sm4375673wra.63.2020.04.21.05.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 05:52:51 -0700 (PDT) Date: Tue, 21 Apr 2020 14:52:50 +0200 From: Michal Hocko To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Baoquan He , Oscar Salvador , Pankaj Gupta Subject: Re: [PATCH RFC 1/2] mm/memory_hotplug: no need to init new pgdat with node_start_pfn Message-ID: <20200421125250.GG27314@dhcp22.suse.cz> References: <20200416104707.20219-1-david@redhat.com> <20200416104707.20219-2-david@redhat.com> <20200421123011.GE27314@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 21-04-20 14:35:12, David Hildenbrand wrote: > On 21.04.20 14:30, Michal Hocko wrote: > > Sorry for the late reply > > > > On Thu 16-04-20 12:47:06, David Hildenbrand wrote: > >> A hotadded node/pgdat will span no pages at all, until memory is moved to > >> the zone/node via move_pfn_range_to_zone() -> resize_pgdat_range - e.g., > >> when onlining memory blocks. We don't have to initialize the > >> node_start_pfn to the memory we are adding. > > > > You are right that the node is empty at this phase but that is already > > reflected by zero present pages (hmm, I do not see spanned pages to be > > set 0 though). What I am missing here is why this is an improvement. The > > new node is already visible here and I do not see why we hide the > > information we already know. > > "information we already know" - no, not before we online the memory. Is this really the case? All add_memory_resource users operate on a physical memory range. > Before onlining, it's just setting node_start_pfn to *some value* to be > overwritten in move_pfn_range_to_zone()->resize_pgdat_range(). Yes the value is overwritten but I am not sure this is actually correct thing to do. I cannot remember why I've chosen to do that. It doesn't really seem unlikely to online node in a higher physical address. Btw. one thing that I have in my notes, I was never able to actually test the no numa node case. Because I have always been testing with node being allocated during the boot. Do you have any way to trigger this path? -- Michal Hocko SUSE Labs