[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGM2reYRYNOe0nweMrSxLZ_RRQbu500iSRKWrbO4_CzyWTEtjQ@mail.gmail.com>
Date: Sun, 1 Jul 2018 21:46:36 -0400
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: bhe@...hat.com
Cc: Steven Sistare <steven.sistare@...cle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
kirill.shutemov@...ux.intel.com, Michal Hocko <mhocko@...e.com>,
Linux Memory Management List <linux-mm@...ck.org>,
dan.j.williams@...el.com, jack@...e.cz, jglisse@...hat.com,
Souptick Joarder <jrdr.linux@...il.com>,
gregkh@...uxfoundation.org, Vlastimil Babka <vbabka@...e.cz>,
Wei Yang <richard.weiyang@...il.com>, dave.hansen@...el.com,
rientjes@...gle.com, mingo@...nel.org, osalvador@...hadventures.net
Subject: Re: [PATCH v2 2/2] mm/sparse: start using sparse_init_nid(), and
remove old code
~~~
> 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.
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
Powered by blists - more mailing lists