Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3402778imm; Sun, 1 Jul 2018 20:56:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKGJmu9jCqVpjtwnpmFv2LLYL27yjYpq5h2+t/OHacGpHclCG2OTT/PUq/FoamknLScpFwY X-Received: by 2002:a17:902:ba97:: with SMTP id k23-v6mr24328153pls.259.1530503770324; Sun, 01 Jul 2018 20:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530503770; cv=none; d=google.com; s=arc-20160816; b=INI42Bz2X8ii1wVzAQ3w5VPWli4zqo03gKM+rJ8KHZ4dzl+YywK2hByeUU+P1E13DA oaziZ3CDOy0DLjQS2sePHmF0mVCg+6NPaVp85zI1WT8jd2kOY5FmPKvs6hI72G8q7XO6 vRKO4yawPc3XkBmhMBGeapFF9NTlffHFAnABbqVp5NOxe58yETX11dKPK4YY/FEzNZuL d9TlEjovyLun0Qnuk2bc8VJzV9jZCfwm211ZaWtECEKqHNuDKTryaokJ2LTTC1ugrpM6 zIaWBrC1uix93ee7jBTXuHG8L9Z9IVVQnMNc/w321zLkzJortYcEgTHjtrbnQJruml10 /f3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=7VLS5DwGPsC61mx8MGDwVNyajWr0SPRd8NXHIPndgkU=; b=SwkuYFopQ/O4ksmT2u+C/96tAj+L/6GnToBslZbqHOevqKU4zcnhjUlYQDF4k9WDi4 XP+wVosOajXX4pp7rYM3vnZ7/ccCG5UWuMfz3A9BlcMftPWyzUhFncMroYXcW2R9YzAj B1pUaGY7XyL5WuP+RqcG+VqWGAa51PT2yCmeoCRhFk68iDeqtpq6jg7zvTBfmJIgp4Y+ dbdpcYhqLJn9LVRG93joMtv23q4MR2e+MxUJ5fLy6Ju36mhAbZkyxklxWRhyxUBbcnjq M7N9grDFyNLxTMIPDJdI0QU0s1SWFXMePZlxXR1WIFc6z6rOGCdxltX5RZDYMZybNSws gI2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3-v6si15328216pld.87.2018.07.01.20.55.55; Sun, 01 Jul 2018 20:56:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932664AbeGBDmh (ORCPT + 99 others); Sun, 1 Jul 2018 23:42:37 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60780 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753057AbeGBDmf (ORCPT ); Sun, 1 Jul 2018 23:42:35 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 78D6F8315E; Mon, 2 Jul 2018 03:42:34 +0000 (UTC) Received: from localhost (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 50A82111DCEE; Mon, 2 Jul 2018 03:42:29 +0000 (UTC) Date: Mon, 2 Jul 2018 11:42:21 +0800 From: Baoquan He To: Pavel Tatashin Cc: Steven Sistare , Daniel Jordan , LKML , Andrew Morton , kirill.shutemov@linux.intel.com, Michal Hocko , Linux Memory Management List , dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, Souptick Joarder , gregkh@linuxfoundation.org, Vlastimil Babka , Wei Yang , dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, osalvador@techadventures.net Subject: Re: [PATCH v3 1/2] mm/sparse: add sparse_init_nid() Message-ID: <20180702034221.GR3223@MiWiFi-R3L-srv> References: <20180702020417.21281-1-pasha.tatashin@oracle.com> <20180702020417.21281-2-pasha.tatashin@oracle.com> <20180702021121.GL3223@MiWiFi-R3L-srv> <20180702023130.GM3223@MiWiFi-R3L-srv> <20180702025343.GN3223@MiWiFi-R3L-srv> <20180702031417.GP3223@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 02 Jul 2018 03:42:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 02 Jul 2018 03:42:34 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'bhe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/01/18 at 11:28pm, Pavel Tatashin wrote: > > > So, on the first failure, we even stop trying to populate other > > > sections. No more memory to do so. > > > > This is the thing I worry about. In old sparse_mem_maps_populate_node() > > you can see, when not present or failed to populate, just continue. This > > is the main difference between yours and the old code. The key logic is > > changed here. > > > > I do not see how we can succeed after the first failure. We still > allocate from the same node: > > sparse_mem_map_populate() may fail only if we could not allocate large > enough buffer vmemmap_buf_start earlier. > > This means that in: > sparse_mem_map_populate() > vmemmap_populate() > vmemmap_populate_hugepages() > vmemmap_alloc_block_buf() (no buffer, so call allocator) > vmemmap_alloc_block(size, node); > __earlyonly_bootmem_alloc(node, size, size, __pa(MAX_DMA_ADDRESS)); > memblock_virt_alloc_try_nid_raw() -> Nothing changes for > this call to succeed. So, all consequent calls to > sparse_mem_map_populate() in this node will fail as well. Yes, you are right, it's improvement. Thanks. > > > > > > Forgot mentioning it's the vervion in mm/sparse-vmemmap.c > > Sorry, I do not understand what is vervion. Typo, 'version', should be. Sorry for that.