Thread (27 messages) 27 messages, 5 authors, 2021-02-17

Re: [PATCH v5 1/1] mm: refactor initialization of struct page for holes in memory layout

From: Mike Rapoport <rppt@kernel.org>
Date: 2021-02-14 17:30:15
Also in: lkml, stable

On Fri, Feb 12, 2021 at 10:56:19AM +0100, David Hildenbrand wrote:
On 12.02.21 10:55, David Hildenbrand wrote:
quoted
On 08.02.21 12:08, Mike Rapoport wrote:
quoted
+#ifdef CONFIG_SPARSEMEM
+	/*
+	 * Sections in the memory map may not match actual populated
+	 * memory, extend the node span to cover the entire section.
+	 */
+	*start_pfn = round_down(*start_pfn, PAGES_PER_SECTION);
+	*end_pfn = round_up(*end_pfn, PAGES_PER_SECTION);
Does that mean that we might create overlapping zones when one node
s/overlapping zones/overlapping nodes/
quoted
starts in the middle of a section and the other one ends in the middle
of a section?
quoted
Could it be a problem? (e.g., would we have to look at neighboring nodes
when making the decision to extend, and how far to extend?)
Having a node end/start in a middle of a section would be a problem, but in
this case I don't see a way to detect how a node should be extended :(

We can return to a v4 [1] without x86 modifications.
With that we'll have struct pages corresponding to a hole in a middle of a
zone with correct zone link and a good guess for the node.

As for the pfn 0 on x86, it'll remain outside any node and zone, but since
it was the case since, like forever, I think we can live with it.

[1] https://lore.kernel.org/lkml/20210130221035.4169-1-rppt@kernel.org (local)

-- 
Sincerely yours,
Mike.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help