All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>,
	Oscar Salvador <osalvador@suse.de>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, anshuman.khandual@arm.com
Subject: Re: [PATCH v2] mm/sparse: set section nid for hot-add memory
Date: Tue, 18 Jun 2019 10:40:06 +0200	[thread overview]
Message-ID: <93d7ea6c-135e-7f12-9d75-b3657862dea0@redhat.com> (raw)
In-Reply-To: <20190618083212.GA24738@richard>

On 18.06.19 10:32, Wei Yang wrote:
> On Tue, Jun 18, 2019 at 09:49:48AM +0200, Oscar Salvador wrote:
>> On Tue, Jun 18, 2019 at 08:55:37AM +0800, Wei Yang wrote:
>>> In case of NODE_NOT_IN_PAGE_FLAGS is set, we store section's node id in
>>> section_to_node_table[]. While for hot-add memory, this is missed.
>>> Without this information, page_to_nid() may not give the right node id.
>>>
>>> BTW, current online_pages works because it leverages nid in memory_block.
>>> But the granularity of node id should be mem_section wide.
>>
>> I forgot to ask this before, but why do you mention online_pages here?
>> IMHO, it does not add any value to the changelog, and it does not have much
>> to do with the matter.
>>
> 
> Since to me it is a little confused why we don't set the node info but still
> could online memory to the correct node. It turns out we leverage the
> information in memblock.

I'd also drop the comment here.

> 
>> online_pages() works with memblock granularity and not section granularity.
>> That memblock is just a hot-added range of memory, worth of either 1 section or multiple
>> sections, depending on the arch or on the size of the current memory.
>> And we assume that each hot-added memory all belongs to the same node.
>>
> 
> So I am not clear about the granularity of node id. section based or memblock
> based. Or we have two cases:
> 
> * for initial memory, section wide
> * for hot-add memory, mem_block wide

It's all a big mess. Right now, you can offline initial memory with
mixed nodes. Also on my list of many ugly things to clean up.

(I even remember that we can have mixed nodes within a section, but I
haven't figured out yet how that is supposed to work in some scenarios)

-- 

Thanks,

David / dhildenb


  reply	other threads:[~2019-06-18  8:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18  0:55 [PATCH v2] mm/sparse: set section nid for hot-add memory Wei Yang
2019-06-18  7:49 ` Oscar Salvador
2019-06-18  8:32   ` Wei Yang
2019-06-18  8:40     ` David Hildenbrand [this message]
2019-06-19  6:10       ` Michal Hocko
2019-06-19  8:54         ` David Hildenbrand
2019-06-19  9:01           ` Michal Hocko
2019-06-19  9:03             ` David Hildenbrand
2019-06-19  9:08               ` Michal Hocko
2019-06-19  9:11                 ` David Hildenbrand
2019-06-19  6:23 ` Michal Hocko
2019-06-19  7:53   ` Oscar Salvador
2019-06-19  8:51     ` David Hildenbrand
2019-06-19  9:04       ` Michal Hocko
2019-06-19  9:07         ` David Hildenbrand
2019-06-19  9:16           ` Michal Hocko
2019-06-19  9:30             ` David Hildenbrand

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=93d7ea6c-135e-7f12-9d75-b3657862dea0@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=richardw.yang@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.