powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block
PATCH v2 1/1 powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block
Allocation from altmap area can fail based on vmemmap page size used. Add kernel info message to indicate the failure. That allows the user to identify whether they are really using persistent memory reserved space for per-page metadata.
The message looks like:
[ 136.587212] altmap block allocation failed, falling back to system memory
--- arch/powerpc/mm/init_64.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/powerpc/mm/init_64.c +5 -1
@@ -194,8 +194,12 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,* fail due to alignment issues when using 16MB hugepages, so * fall back to system memory if the altmap allocation fail. */ -if (altmap) +if (altmap) { p =altmap_alloc_block_buf (page_size, altmap); +if (!p) +pr_debug ("altmap block allocation failed, " \ +"falling back to system memory" ); + }if (!p) p =vmemmap_alloc_block_buf (page_size, node);if (!p)
Signature · 1 line
2.21.0
Quoted 32 lines · Aneesh Kumar K.V
Allocation from altmap area can fail based on vmemmap page size used. Add kernel info message to indicate the failure. That allows the user to identify whether they are really using persistent memory reserved space for per-page metadata.
The message looks like:
[ 136.587212] altmap block allocation failed, falling back to system memorySigned-off-by Aneesh Kumar K.V <[email protected]>--- arch/powerpc/mm/init_64.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/powerpc/mm/init_64.c +5
-2@@ -194,8 +194,12 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,* fail due to alignment issues when using 16MB hugepages, so * fall back to system memory if the altmap allocation fail. */ -if (altmap) +if (altmap) { p =altmap_alloc_block_buf (page_size, altmap); +if (!p) +pr_debug ("altmap block allocation failed, " \ +"falling back to system memory" ); + }if (!p) p =vmemmap_alloc_block_buf (page_size, node);if (!p) --
Quoted 2 lines
2.21.0
I'll let mpe decide if he cares about the split line thing :)
Michael Ellerman
AppliedQuoted 9 lines · Aneesh Kumar K.V
Allocation from altmap area can fail based on vmemmap page size used. Add kernel info message to indicate the failure. That allows the user to identify whether they are really using persistent memory reserved space for per-page metadata.
The message looks like:
[ 136.587212] altmap block allocation failed, falling back to system memorySigned-off-by Aneesh Kumar K.V <[email protected]>Reviewed-by Oliver O'Halloran <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/c0b1b23b9c87569d5f90d06e86f26b31b544fa1e
cheers