Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7522696imm; Thu, 28 Jun 2018 05:18:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKultQVzQ/CmxPaK6zzTnipSo6Y79BnDmQ8Ykpfv0KS+iTF8dvH79bAWf2bomBtZdHeQHxM X-Received: by 2002:a17:902:a9ca:: with SMTP id b10-v6mr10300829plr.275.1530188284242; Thu, 28 Jun 2018 05:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530188284; cv=none; d=google.com; s=arc-20160816; b=Y4K3SS9woFM46byCIAxAnFzgd29SyeYf+b81wEvB1L8Ve2Ibb2Rsm4EFK2oEXuL06W 91sn5V/j1qDXtWpUZ9pTTJDp71HUupuGc20lor3jqXuCmtOXLIKLSR/wYQuKKTfW6Bqh LfbbSbP+SL7NliWirOWO++wBc8H6bxY6akfzOetF7/HIFRAI/CsW9zlXGPlloNaxHlhk jI2n0b/KsP86Ta7L7wXdh2ZTdo+s/udNUSu03dI5kusfeONxBsBfqo09uwb9Ufvhns0y heX2Mkjk905hpSunvFejAY/aUAPjJiwFt2SzyLr3dnXiuBN0xicMU05cLHP+Rnfb+YVy rlQg== 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=UKr5OAlCNAgYLwF64gnkCFKXbEsRAMa6Yjmwx+2UmcY=; b=pOv7lHS2/3f4Wlv7KXeunRmZi021TJbjW+/aNG3rEfsGlzjcMjBSd8U3jc+Z5b82fb EcJaYbhQxJFYqQ3172tu7MdBwoa/AoJ3XlVnVEPpKTDDHppSRYbi4Gu2+zZOXdbqvBSe mDFtlZLKTP4lDXGt15S38nS7JOsYt5uTCcBkiTwOVPzf1V85h5f+QqcJrGndb+2cAwlp IKYiVU7AKhHPcc/zga/vA5nQPPMx7ZF5yHdmEC/ABdJRTYDiL6REgB3uT1wZuh8v20t1 tC3Sil77dDIXm2bTyiovKbh5wlCWcBzvT7XlFs2qfdbgp9g4Y+RvHR2oVTpv07zrNwZv a5AA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4-v6si6320733plt.497.2018.06.28.05.17.34; Thu, 28 Jun 2018 05:18:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965388AbeF1LYN (ORCPT + 99 others); Thu, 28 Jun 2018 07:24:13 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36015 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbeF1LYM (ORCPT ); Thu, 28 Jun 2018 07:24:12 -0400 Received: by mail-wm0-f66.google.com with SMTP id u18-v6so8660133wmc.1 for ; Thu, 28 Jun 2018 04:24:11 -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:user-agent; bh=UKr5OAlCNAgYLwF64gnkCFKXbEsRAMa6Yjmwx+2UmcY=; b=jlvCdKuXSBOjQFNTT7I3fSffqgSoObPoQltn8L1ZEsocyiuODh27/uXkJadgBOtyYf Nj10pvVi3XEzNl6Ke0x4nFfDSZmQYdF2IG4yMPVWHfEohMBl+kkCyCSAQ6Abqfh/yA1b gQwuWH2W62xKj5J26PZff/LI4HtZAwW7fy50pQ9AJ4vl/RcAgGbYtvAjk1vgrzuC66zK /TzJwA+ANQcdqPeZ8GJNev0700h5oYpSxm9L5xQ7TL26reqnaVWUctWy61SJsUKrfX9n 1U8mcMQq0L85VKbRUp1umqww2+lgxg/hm4v6hfEU18dff+oNHFtP6ifb7wwiwwJ22v/z Dt7w== X-Gm-Message-State: APt69E0Tu1t4YTt4swF4oR0oGDp5wz0EZ1FpTSaOZAzIj+RyY3uy2cr0 +2Y4gYxDP4Iul4dirljV0M0= X-Received: by 2002:a1c:7a19:: with SMTP id v25-v6mr1235088wmc.81.1530185051224; Thu, 28 Jun 2018 04:24:11 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id m3-v6sm6560904wro.27.2018.06.28.04.24.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 04:24:10 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id B725212390E; Thu, 28 Jun 2018 13:24:09 +0200 (CEST) Date: Thu, 28 Jun 2018 13:24:09 +0200 From: Oscar Salvador To: Baoquan He Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, pagupta@redhat.com, Pavel Tatashin , linux-mm@kvack.org, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v6 1/5] mm/sparse: Add a static variable nr_present_sections Message-ID: <20180628112409.GB12956@techadventures.net> References: <20180628062857.29658-1-bhe@redhat.com> <20180628062857.29658-2-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180628062857.29658-2-bhe@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 28, 2018 at 02:28:53PM +0800, Baoquan He wrote: > It's used to record how many memory sections are marked as present > during system boot up, and will be used in the later patch. > > Signed-off-by: Baoquan He > Reviewed-by: Pavel Tatashin Reviewed-by: Oscar Salvador > --- > mm/sparse.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/mm/sparse.c b/mm/sparse.c > index f13f2723950a..6314303130b0 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -200,6 +200,12 @@ static inline int next_present_section_nr(int section_nr) > (section_nr <= __highest_present_section_nr)); \ > section_nr = next_present_section_nr(section_nr)) > > +/* > + * Record how many memory sections are marked as present > + * during system bootup. > + */ > +static int __initdata nr_present_sections; > + > /* Record a memory area against a node. */ > void __init memory_present(int nid, unsigned long start, unsigned long end) > { > @@ -229,6 +235,7 @@ void __init memory_present(int nid, unsigned long start, unsigned long end) > ms->section_mem_map = sparse_encode_early_nid(nid) | > SECTION_IS_ONLINE; > section_mark_present(ms); > + nr_present_sections++; > } > } > } > -- > 2.13.6 > -- Oscar Salvador SUSE L3