Received: by 10.223.185.116 with SMTP id b49csp2420227wrg; Thu, 22 Feb 2018 13:29:55 -0800 (PST) X-Google-Smtp-Source: AH8x2262MGzEDDpCdaJ14EiTgCA54vSTzjGh2QntluTdlfuVscHH1LgEIfY9m17bWewbDAxegdMF X-Received: by 2002:a17:902:b081:: with SMTP id p1-v6mr7729590plr.314.1519334995315; Thu, 22 Feb 2018 13:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519334995; cv=none; d=google.com; s=arc-20160816; b=xK5IFBDlMMZijCLMuM7Jmy9mH7A/CFyvnwF3R68Dpt7Eh/aXDMdOs4yaevU8lgkqyK fQUO12SM9PF21gN1jCQH0t/I2cAAn4H4r20vPVgzMcezdjOMOc5Ck076tSFzeq0YZmgL QMmwJKSNDQ7GGCkS7xnMmEL2XejF8f5gGmImMk3Ne+1nJyh+9MWKiYE8D2F3lbN0ksEp Qkf2rnJZ8Z+DQpdyvtFzGbg3fkXS6ZTQDBNeu4lmKi/DOJqi5Ja7RXu5hNRKuTZKsfDc FnLGo8LudRldc0/vbXB2CqErcGWIZEoGeCWoGZ1vefRA4CJgBY2mgTEE0Xs2Iu9Nk3jL ss2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=jvH5cSK1JCe8z/Wu0TZZXvOQ0gUYYJ5LZEkRy2TOGVE=; b=K3MseJ4jdI+i1gf/s6e8dwdq9MP3SLFblmVkqI2CA4zaQe9Dtl1AeZqVEBtVUeYYKm FlmgtwR5asxXAVRSO3WGIiyYUJ3Wz/5sdsobeJ3uBqxeP19PG5WTS8WnddKeE4sJl9dS Aspt/a2eEKMQHIgILsSoZysMLlxf5FxMgcYyeKroigftNekhNFRrzdTnHqPxB1CQ+/Wk hkdhFFJM+tCsMlLFgihP39OheevSyM+o39jD1/Ewu91Ig1mT+atVvG0+Eyn9l4eUhJBI eUiX+TA7lQzcox5y9TrVa4Hoa4ZDTxHNZv4D0OIETSRJPuKGZZ+o9fkz0FPzedFEWSD5 wOWQ== 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 n12si526383pgf.289.2018.02.22.13.29.40; Thu, 22 Feb 2018 13:29:55 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751537AbeBVVYn (ORCPT + 99 others); Thu, 22 Feb 2018 16:24:43 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44662 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432AbeBVVYn (ORCPT ); Thu, 22 Feb 2018 16:24:43 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 60DF410FD; Thu, 22 Feb 2018 21:24:42 +0000 (UTC) Date: Thu, 22 Feb 2018 13:24:41 -0800 From: Andrew Morton To: Baoquan He Cc: linux-kernel@vger.kernel.org, dave.hansen@intel.com, linux-mm@kvack.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, tglx@linutronix.de Subject: Re: [PATCH v2 1/3] mm/sparse: Add a static variable nr_present_sections Message-Id: <20180222132441.51a8eae9e9656a82a2161070@linux-foundation.org> In-Reply-To: <20180222091130.32165-2-bhe@redhat.com> References: <20180222091130.32165-1-bhe@redhat.com> <20180222091130.32165-2-bhe@redhat.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Feb 2018 17:11:28 +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. > > --- 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; I think this could be __initdata. A nice comment explaining why it exists would be nice.