Skip to contentSkip to conversation

vmemmap_verify() BUGs during memory hotplug (4.2-rc1 regression)

DISCUSSION David Vrabel 2 participants 3 messages Jul 27, 2015 – Jul 28, 2015 Memory management

lore
Share & tools
lore
#0 lore raw

Mel,

As of commit 8a942fdea560d4ac0e9d9fabcd5201ad20e0c382 (mm: meminit: make __early_pfn_to_nid SMP-safe and introduce meminit_pfn_in_nid) vmemmap_verify() will BUG_ON() during memory hotplug because of its use of early_pfn_to_nid(). Previously, it would have reported bogus (or failed to report valid) warnings.

I believe this does not affect memory hotplug on most x86 systems because vmemmap_populate() would normally call vmemmap_populate_hugepages() which avoids calling vmemmap_verify() in the common case (no existing mappings covering the new area).

I'm triggering the early_pfn_to_nid() BUG_ON() with the Xen balloon driver in a PV guest which will always call vmemmap_populate_basepages() (since Xen PV guests lack superpage support).

Not really sure what the best way to resolve this is. Presumably vmmemmap_verify() needs to switch to using pfn_to_nid() after the initial initialization but there doesn't appear to be anything suitable to distinguish between the early and hotplug cases.

David

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 8 lines · David Vrabel

Mel,

As of commit 8a942fdea560d4ac0e9d9fabcd5201ad20e0c382 (mm: meminit: make __early_pfn_to_nid SMP-safe and introduce meminit_pfn_in_nid) vmemmap_verify() will BUG_ON() during memory hotplug because of its use of early_pfn_to_nid(). Previously, it would have reported bogus (or failed to report valid) warnings.

Please test "mm, meminit: Allow early_pfn_to_nid to be used during runtime"

Signature · 8 lines
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#2 lore raw
Quoted 10 lines · Mel Gorman
Quoted 8 lines · David Vrabel

Mel,

As of commit 8a942fdea560d4ac0e9d9fabcd5201ad20e0c382 (mm: meminit: make __early_pfn_to_nid SMP-safe and introduce meminit_pfn_in_nid) vmemmap_verify() will BUG_ON() during memory hotplug because of its use of early_pfn_to_nid(). Previously, it would have reported bogus (or failed to report valid) warnings.

Quoted 2 lines

Please test "mm, meminit: Allow early_pfn_to_nid to be used during runtime"

That fixed the BUG_ON() thanks. But I still can't only the new sections because their first page is not reserved, but I've not had time to investigate why this is yet.

David

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>