All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/papr_scm: Don't enable direct map for a region by default
@ 2020-01-08  6:46 Aneesh Kumar K.V
  2020-01-29  5:17 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2020-01-08  6:46 UTC (permalink / raw)
  To: mpe, dan.j.williams, Oliver O'Halloran; +Cc: Aneesh Kumar K.V, linuxppc-dev

Setting ND_REGION_PAGEMAP flag implies namespace mode defaults to fsdax mode.
This also means kernel ends up creating struct page backing for these namspace
ranges. With large namespaces that is not the right thing to do. We
should let the user select the mode he/she wants the namespace to be created
with.

Hence disable ND_REGION_PAGEMAP for papr_scm regions. We still keep the flag for
of_pmem because it supports only small persistent memory regions.

This is similar to what is done for x86 with commit
commit: 004f1afbe199 ("libnvdimm, pmem: direct map legacy pmem by default")

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/platforms/pseries/papr_scm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index 26a5ef263758..ffcd0d7a867c 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -356,7 +356,6 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)
 	ndr_desc.mapping = &mapping;
 	ndr_desc.num_mappings = 1;
 	ndr_desc.nd_set = &p->nd_set;
-	set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
 
 	if (p->is_volatile)
 		p->region = nvdimm_volatile_region_create(p->bus, &ndr_desc);
-- 
2.24.1


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

* Re: [PATCH] powerpc/papr_scm: Don't enable direct map for a region by default
  2020-01-08  6:46 [PATCH] powerpc/papr_scm: Don't enable direct map for a region by default Aneesh Kumar K.V
@ 2020-01-29  5:17 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-01-29  5:17 UTC (permalink / raw)
  To: Aneesh Kumar K.V, dan.j.williams, Oliver O'Halloran
  Cc: Aneesh Kumar K.V, linuxppc-dev

On Wed, 2020-01-08 at 06:46:47 UTC, "Aneesh Kumar K.V" wrote:
> Setting ND_REGION_PAGEMAP flag implies namespace mode defaults to fsdax mode.
> This also means kernel ends up creating struct page backing for these namspace
> ranges. With large namespaces that is not the right thing to do. We
> should let the user select the mode he/she wants the namespace to be created
> with.
> 
> Hence disable ND_REGION_PAGEMAP for papr_scm regions. We still keep the flag for
> of_pmem because it supports only small persistent memory regions.
> 
> This is similar to what is done for x86 with commit
> commit: 004f1afbe199 ("libnvdimm, pmem: direct map legacy pmem by default")
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7e6f8cbc5e10cf7601c762db267b795273d53078

cheers

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

end of thread, other threads:[~2020-01-29  6:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08  6:46 [PATCH] powerpc/papr_scm: Don't enable direct map for a region by default Aneesh Kumar K.V
2020-01-29  5:17 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.