linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: Oscar Salvador <osalvador@suse.de>
Cc: Wei Yang <richardw.yang@linux.intel.com>,
	linux-mm@kvack.org, akpm@linux-foundation.org,
	pasha.tatashin@oracle.com
Subject: Re: [PATCH] mm/sparse: set section nid for hot-add memory
Date: Tue, 18 Jun 2019 08:45:43 +0800	[thread overview]
Message-ID: <20190618004543.GB18161@richard> (raw)
In-Reply-To: <20190617154314.GA2407@linux>

On Mon, Jun 17, 2019 at 05:43:25PM +0200, Oscar Salvador wrote:
>On Sun, Jun 16, 2019 at 10:35:54AM +0800, Wei Yang wrote:
>> section_to_node_table[] is used to record section's node id, which is
>> used in page_to_nid(). While for hot-add memory, this is missed.
>> 
>> BTW, current online_pages works because it leverages nid in memory_block.
>> But the granularity of node id should be mem_section wide.
>> 
>> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
>
>While the patch is valid, I think that the changelog could be improved a bit.
>For example, I would point out the possible problems we can face if it is not set
>properly (e.g: page_to_nid() operations failing to give the right node) and when
>section_to_node_table[] is used (NODE_NOT_IN_PAGE_FLAGS scenario).
>

Thanks, let me give more words on this.

>Reviewed-by: Oscar Salvador <osalvador@suse.de>
>
>> ---
>>  mm/sparse.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/mm/sparse.c b/mm/sparse.c
>> index fd13166949b5..3ba8f843cb7a 100644
>> --- a/mm/sparse.c
>> +++ b/mm/sparse.c
>> @@ -735,6 +735,7 @@ int __meminit sparse_add_one_section(int nid, unsigned long start_pfn,
>>  	 */
>>  	page_init_poison(memmap, sizeof(struct page) * PAGES_PER_SECTION);
>>  
>> +	set_section_nid(section_nr, nid);
>>  	section_mark_present(ms);
>>  	sparse_init_one_section(ms, section_nr, memmap, usemap);
>>  
>> -- 
>> 2.19.1
>> 
>
>-- 
>Oscar Salvador
>SUSE L3

-- 
Wei Yang
Help you, Help me


      reply	other threads:[~2019-06-18  0:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16  2:35 Wei Yang
2019-06-17  4:23 ` Anshuman Khandual
2019-06-17  8:46   ` Wei Yang
2019-06-17 13:13 ` David Hildenbrand
2019-06-18  0:36   ` Wei Yang
2019-06-17 15:43 ` Oscar Salvador
2019-06-18  0:45   ` Wei Yang [this message]

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=20190618004543.GB18161@richard \
    --to=richardw.yang@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=pasha.tatashin@oracle.com \
    /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