All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	linux-nvdimm@lists.01.org, dan.j.williams@intel.com
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: [RFC PATCH 2/2] powerpc/pmem: Disable synchronous fault by default.
Date: Fri, 29 May 2020 11:11:40 +0530	[thread overview]
Message-ID: <20200529054141.156384-2-aneesh.kumar@linux.ibm.com> (raw)
In-Reply-To: <20200529054141.156384-1-aneesh.kumar@linux.ibm.com>

This adds a kernel config option that controls whether MAP_SYNC is enabled by
default. With POWER10, architecture is adding new pmem flush and sync
instructions. The kernel should prevent the usage of MAP_SYNC if applications
are not using the new instructions on newer hardware.

This config allows user to control whether MAP_SYNC should be enabled by
default or not.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/platforms/Kconfig.cputype | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 27a81c291be8..f8694838ad4e 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -383,6 +383,15 @@ config PPC_KUEP
 
 	  If you're unsure, say Y.
 
+config ARCH_MAP_SYNC_DISABLE
+	bool "Disable synchronous fault support (MAP_SYNC)"
+	default y
+	help
+	  Disable support for synchronous fault with nvdimm namespaces.
+
+	  If you're unsure, say Y.
+
+
 config PPC_HAVE_KUAP
 	bool
 
-- 
2.26.2
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	linux-nvdimm@lists.01.org, dan.j.williams@intel.com
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, oohall@gmail.com
Subject: [RFC PATCH 2/2] powerpc/pmem: Disable synchronous fault by default.
Date: Fri, 29 May 2020 11:11:40 +0530	[thread overview]
Message-ID: <20200529054141.156384-2-aneesh.kumar@linux.ibm.com> (raw)
In-Reply-To: <20200529054141.156384-1-aneesh.kumar@linux.ibm.com>

This adds a kernel config option that controls whether MAP_SYNC is enabled by
default. With POWER10, architecture is adding new pmem flush and sync
instructions. The kernel should prevent the usage of MAP_SYNC if applications
are not using the new instructions on newer hardware.

This config allows user to control whether MAP_SYNC should be enabled by
default or not.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/platforms/Kconfig.cputype | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 27a81c291be8..f8694838ad4e 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -383,6 +383,15 @@ config PPC_KUEP
 
 	  If you're unsure, say Y.
 
+config ARCH_MAP_SYNC_DISABLE
+	bool "Disable synchronous fault support (MAP_SYNC)"
+	default y
+	help
+	  Disable support for synchronous fault with nvdimm namespaces.
+
+	  If you're unsure, say Y.
+
+
 config PPC_HAVE_KUAP
 	bool
 
-- 
2.26.2


  reply	other threads:[~2020-05-29  5:42 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  5:41 [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support Aneesh Kumar K.V
2020-05-29  5:41 ` Aneesh Kumar K.V
2020-05-29  5:41 ` Aneesh Kumar K.V [this message]
2020-05-29  5:41   ` [RFC PATCH 2/2] powerpc/pmem: Disable synchronous fault by default Aneesh Kumar K.V
2020-05-29  9:33 ` [RFC PATCH 1/2] libnvdimm: Add prctl control for disabling synchronous fault support Michal Suchánek
2020-05-29  9:33   ` Michal Suchánek
2020-05-29  9:37   ` Aneesh Kumar K.V
2020-05-29  9:37     ` Aneesh Kumar K.V
2020-05-29  9:52     ` Jan Kara
2020-05-29  9:52       ` Jan Kara
2020-05-29 10:55       ` Aneesh Kumar K.V
2020-05-29 10:55         ` Aneesh Kumar K.V
2020-05-29 19:22         ` Dan Williams
2020-05-29 19:22           ` Dan Williams
2020-05-30  7:18           ` Aneesh Kumar K.V
2020-05-30  7:18             ` Aneesh Kumar K.V
2020-05-30 16:35             ` Dan Williams
2020-05-30 16:35               ` Dan Williams
2020-06-01  9:50               ` Jan Kara
2020-06-01  9:50                 ` Jan Kara
2020-06-02 17:59                 ` Williams, Dan J
2020-06-02 17:59                   ` Williams, Dan J
2020-06-03  8:26                   ` Jan Kara
2020-06-03  8:26                     ` Jan Kara
2020-06-03  9:09                     ` Aneesh Kumar K.V
2020-06-03  9:09                       ` Aneesh Kumar K.V
2020-06-08  7:42                       ` Aneesh Kumar K.V
2020-06-08  7:42                         ` Aneesh Kumar K.V
2020-06-01 10:09         ` Jan Kara
2020-06-01 10:09           ` Jan Kara
2020-06-01 12:01           ` Aneesh Kumar K.V
2020-06-01 12:01             ` Aneesh Kumar K.V
2020-06-01 12:07             ` Michal Suchánek
2020-06-01 12:07               ` Michal Suchánek
2020-06-01 12:20               ` Aneesh Kumar K.V
2020-06-01 12:20                 ` Aneesh Kumar K.V
2020-06-02  7:57                 ` Aneesh Kumar K.V
2020-06-02  7:57                   ` Aneesh Kumar K.V
2020-06-01 14:56             ` Jan Kara
2020-06-01 14:56               ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200529054141.156384-2-aneesh.kumar@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.