Received: by 10.223.185.116 with SMTP id b49csp31782wrg; Thu, 22 Feb 2018 15:58:03 -0800 (PST) X-Google-Smtp-Source: AH8x2257qfSbA7+emlqA+dR7uJfxzv1Y6xN8l/6QXVUrRLomHtoahVUjm1HXdukBZrK5BvUnDUHU X-Received: by 10.99.114.86 with SMTP id c22mr2309669pgn.162.1519343883131; Thu, 22 Feb 2018 15:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519343883; cv=none; d=google.com; s=arc-20160816; b=ICImV86wQs59GEyiOzDTOrSE+Wf4f6mUwJyQkcKKt8DWWgbP03V6+R0E4bzmGetKN7 8X3A52ykEVg8yZUZjrioJ5uE8BZ8jQz77UG5Q72iN3bAvexZ60wZ6DB1W74L6Z7ClsVf S1tm3xG0Jz74JMUpfNWaA7hSMF/LDGHkdwfFzvJ3pXv7KeJqUrivt6CXyPFHiwGJGal1 Eb9tw216KyKgyvND5aUTfuhac31+pSyrMBYmbLS69kC8vnVaidmKiFXWlCe5oDJxF4aF 3QrozbtnF9Ne8nKK37yapMmIghFsOw0lu6tWYbrHYKHPOZJW9NO80wGmXDDzK4hRD7By jLKQ== 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=J97CuRswlZ5dlInANewTQNguILrRUG/h7bDzMkyUahk=; b=WPzShClywYer7dZ6ZP/VwSfgxo9oeR68lfCZaijBD8cTXsD8premT7YMzI7YAHGJuf cW2Dpdrc2bqMOxYBfGrwtkPyIZIXsbXhGg/bfWjDFu6Cj2MK/n4dtG6Bp37w0HqSa/Du mspOXceaijliTSAnuoWtu9kDjWORpBUBwBsF1u4U0dSynunk85TUof1gqBX5j4rDccsh hOcGjw9KvYs/JdnreapmuvGE2pCy+hUosoP7j0oqE9ElsKXL3Yndlqc2zOTNTlf7ZnmO ZITAQoLlfJQYEsjJtFNs24b1z9ZkDUg8/HCuj+nzCE3GswH9h4HO5FMDXbZgDZyw9nv0 dVBw== 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 g7si673739pgp.442.2018.02.22.15.57.47; Thu, 22 Feb 2018 15:58:03 -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 S1751998AbeBVX4p (ORCPT + 99 others); Thu, 22 Feb 2018 18:56:45 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46192 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751283AbeBVX4o (ORCPT ); Thu, 22 Feb 2018 18:56:44 -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 879E5404085A; Thu, 22 Feb 2018 23:56:43 +0000 (UTC) Received: from localhost (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CD132026E03; Thu, 22 Feb 2018 23:56:42 +0000 (UTC) Date: Fri, 23 Feb 2018 07:56:39 +0800 From: Baoquan He To: Andrew Morton 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: <20180222235639.GD693@localhost.localdomain> References: <20180222091130.32165-1-bhe@redhat.com> <20180222091130.32165-2-bhe@redhat.com> <20180222132441.51a8eae9e9656a82a2161070@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222132441.51a8eae9e9656a82a2161070@linux-foundation.org> User-Agent: Mutt/1.9.1 (2017-09-22) 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.5]); Thu, 22 Feb 2018 23:56:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 22 Feb 2018 23:56:43 +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 On 02/22/18 at 01:24pm, Andrew Morton wrote: > 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. Thanks, I will update as you suggested. >