Received: by 10.223.185.116 with SMTP id b49csp1690068wrg; Thu, 22 Feb 2018 01:14:23 -0800 (PST) X-Google-Smtp-Source: AH8x22683cUG+Eyl9OQqB4+f2f06uD3agz8REQs3rqm4NIGkcg3AJLxXWKwM6tmm0u85ImeIKOIT X-Received: by 10.101.72.199 with SMTP id o7mr2445502pgs.303.1519290863098; Thu, 22 Feb 2018 01:14:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519290863; cv=none; d=google.com; s=arc-20160816; b=e5MDlDc/DdylxTqHJclQgtB9dWLwBRLXQ7R4/Guv05dLJAHSRXVvIU8ZYji3XfjLv9 mXJEdq8I/LzlKcu4w4KS6j+y826GsDyCYEh8CS15DabDKEv3LiqP5/mZDCaR4PL7U/kJ JpXQmm8n+KWotwEc7hVcYFijtBy6P3E4+/cJ13a1D9TSKI8WNHeEJclOz5pMBYb6P7DT vLFIpVbSMHHFwAbdBzWsC6SPq3zwgcIL5TFf6Z/Xolg5gIdPtTSo1ktUmPurO/l320um kfwrPKYmyQJPkdCN7GcI8V0MSb9a7dRcCg6pRgrY6qo9N9i08535kTo+q/26S1HLm8sa Flfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=32pYuOttnO9HSzTFyDjbOLRg7mNlBk82PThxT7OYmpY=; b=VY/4MHyN0OWWXvVO79V0mKdhJUtQz4ZMEU8r3d86pQiVr3t3nYl3ijdNEkaE/tRsH6 dzsOs+InPSSL6HoQMHzCkC4cF7VEPurx79bGhx0kHYqQPXAb7gJ4hp/PXvBLO2h3N4hk E1tG3iZ9iEUfI3kV3L5EOv9UH0H82qAUXzBwdAYC+q0unL10n6lH+t/Sayu8OIxBEFaX Tnp77jXC7cTuACNE4qvhbi3X8jUn0LpUZnxGLhaXQVxMO9C2se4M0ojVbeA1rLnYkJpD 8Mhz3M0/J0rUlEglqMGlTOtBzIrf8RPiRs+30Ii3vpiCUxbCon9Hi/mnwgF9ETcgZ92z Yzpg== 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 q22si3803780pfk.225.2018.02.22.01.14.09; Thu, 22 Feb 2018 01:14:23 -0800 (PST) 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 S1753034AbeBVJLu (ORCPT + 99 others); Thu, 22 Feb 2018 04:11:50 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54344 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753017AbeBVJLq (ORCPT ); Thu, 22 Feb 2018 04:11:46 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7531A8182D1E; Thu, 22 Feb 2018 09:11:45 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-8-20.pek2.redhat.com [10.72.8.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 608322024CA9; Thu, 22 Feb 2018 09:11:40 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org, dave.hansen@intel.com Cc: linux-mm@kvack.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, tglx@linutronix.de, Baoquan He Subject: [PATCH v2 1/3] mm/sparse: Add a static variable nr_present_sections Date: Thu, 22 Feb 2018 17:11:28 +0800 Message-Id: <20180222091130.32165-2-bhe@redhat.com> In-Reply-To: <20180222091130.32165-1-bhe@redhat.com> References: <20180222091130.32165-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 22 Feb 2018 09:11:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 22 Feb 2018 09:11:45 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 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 --- mm/sparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/sparse.c b/mm/sparse.c index 7af5e7a92528..433d3c9b4b56 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -202,6 +202,7 @@ static inline int next_present_section_nr(int section_nr) (section_nr <= __highest_present_section_nr)); \ section_nr = next_present_section_nr(section_nr)) +static int nr_present_sections; /* Record a memory area against a node. */ void __init memory_present(int nid, unsigned long start, unsigned long end) { @@ -231,6 +232,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