Thread (3 messages) 3 messages, 3 authors, 2019-07-08

Re: [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block

flat view

From: "Oliver O'Halloran" <oohall@gmail.com>
Date: 2019-07-03 01:56:00

On Tue, Jul 2, 2019 at 12:33 AM Aneesh Kumar K.V
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
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

Signed-off-by: Aneesh Kumar K.V <redacted>
---
 arch/powerpc/mm/init_64.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index a4e17a979e45..f3b64f49082b 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -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)
--
2.21.0
I'll let mpe decide if he cares about the split line thing :)

Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help