linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block
@ 2019-07-01 14:33 Aneesh Kumar K.V
  2019-07-03  1:53 ` Oliver O'Halloran
  2019-07-08  1:19 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Aneesh Kumar K.V @ 2019-07-01 14:33 UTC (permalink / raw)
  To: npiggin, paulus, mpe
  Cc: Oliver O'Halloran, linuxppc-dev, 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 memory

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block
  2019-07-01 14:33 [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block Aneesh Kumar K.V
@ 2019-07-03  1:53 ` Oliver O'Halloran
  2019-07-08  1:19 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver O'Halloran @ 2019-07-03  1:53 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: Paul Mackerras, linuxppc-dev, Nicholas Piggin

On Tue, Jul 2, 2019 at 12:33 AM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> 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 <aneesh.kumar@linux.ibm.com>
> ---
>  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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block
  2019-07-01 14:33 [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block Aneesh Kumar K.V
  2019-07-03  1:53 ` Oliver O'Halloran
@ 2019-07-08  1:19 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2019-07-08  1:19 UTC (permalink / raw)
  To: Aneesh Kumar K.V, npiggin, paulus
  Cc: linuxppc-dev, Oliver O'Halloran, Aneesh Kumar K.V

On Mon, 2019-07-01 at 14:33:38 UTC, "Aneesh Kumar K.V" wrote:
> 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 <aneesh.kumar@linux.ibm.com>
> Reviewed-by: Oliver O'Halloran <oohall@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/c0b1b23b9c87569d5f90d06e86f26b31b544fa1e

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-08  2:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01 14:33 [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block Aneesh Kumar K.V
2019-07-03  1:53 ` Oliver O'Halloran
2019-07-08  1:19 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).