From: Baoquan He <bhe@redhat.com>
To: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Steven Sistare <steven.sistare@oracle.com>,
Daniel Jordan <daniel.m.jordan@oracle.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
kirill.shutemov@linux.intel.com, Michal Hocko <mhocko@suse.com>,
Linux Memory Management List <linux-mm@kvack.org>,
dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com,
Souptick Joarder <jrdr.linux@gmail.com>,
gregkh@linuxfoundation.org, Vlastimil Babka <vbabka@suse.cz>,
Wei Yang <richard.weiyang@gmail.com>,
dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org,
osalvador@techadventures.net
Subject: Re: [PATCH v2 2/2] mm/sparse: start using sparse_init_nid(), and remove old code
Date: Mon, 2 Jul 2018 09:52:11 +0800 [thread overview]
Message-ID: <20180702015211.GK3223@MiWiFi-R3L-srv> (raw)
In-Reply-To: <CAGM2reYRYNOe0nweMrSxLZ_RRQbu500iSRKWrbO4_CzyWTEtjQ@mail.gmail.com>
On 07/01/18 at 09:46pm, Pavel Tatashin wrote:
> ~~~
> > Here, node id passed to sparse_init_nid() should be 'nid_begin', but not
> > 'nid'. When you found out the current section's 'nid' is diferent than
> > 'nid_begin', handle node 'nid_begin', then start to next node 'nid'.
>
> Thank you for reviewing this work. Here nid equals to nid_begin:
>
> See, "if" at 501, and this call is at 505.
Yes, if they are equal at 501, 'continue' to for loop. If nid is not
equal to nid_begin, we execute sparse_init_nid(), here should it be that
nid_begin is the current node, nid is next node?
>
> 492 void __init sparse_init(void)
> 493 {
> 494 unsigned long pnum_begin = first_present_section_nr();
> 495 int nid_begin = sparse_early_nid(__nr_to_section(pnum_begin));
> 496 unsigned long pnum_end, map_count = 1;
> 497
> 498 for_each_present_section_nr(pnum_begin + 1, pnum_end) {
> 499 int nid = sparse_early_nid(__nr_to_section(pnum_end));
> 500
> 501 if (nid == nid_begin) {
> 502 map_count++;
> 503 continue;
> 504 }
> 505 sparse_init_nid(nid, pnum_begin, pnum_end, map_count);
> 506 nid_begin = nid;
> 507 pnum_begin = pnum_end;
> 508 map_count = 1;
> 509 }
> 510 sparse_init_nid(nid_begin, pnum_begin, pnum_end, map_count);
> 511 vmemmap_populate_print_last();
> 512 }
>
> Thank you,
> Pavel
next prev parent reply other threads:[~2018-07-02 1:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-30 3:09 [PATCH v2 0/2] sparse_init rewrite Pavel Tatashin
2018-06-30 3:09 ` [PATCH v2 1/2] mm/sparse: add sparse_init_nid() Pavel Tatashin
2018-07-02 1:29 ` Baoquan He
2018-07-02 1:43 ` Pavel Tatashin
2018-06-30 3:09 ` [PATCH v2 2/2] mm/sparse: start using sparse_init_nid(), and remove old code Pavel Tatashin
2018-07-02 1:34 ` Baoquan He
2018-07-02 1:44 ` Pavel Tatashin
2018-07-02 1:39 ` Baoquan He
2018-07-02 1:46 ` Pavel Tatashin
2018-07-02 1:52 ` Baoquan He [this message]
2018-07-02 1:55 ` Pavel Tatashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180702015211.GK3223@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=daniel.m.jordan@oracle.com \
--cc=dave.hansen@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=jglisse@redhat.com \
--cc=jrdr.linux@gmail.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=osalvador@techadventures.net \
--cc=pasha.tatashin@oracle.com \
--cc=richard.weiyang@gmail.com \
--cc=rientjes@google.com \
--cc=steven.sistare@oracle.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox