nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI/NFIT: Add no_deepflush param to dynamic control flush operation
@ 2022-06-29  8:31 Dennis.Wu
  2022-06-29 15:27 ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: Dennis.Wu @ 2022-06-29  8:31 UTC (permalink / raw)
  To: nvdimm; +Cc: dan.j.williams, vishal.l.verma, dave.jiang, ira.weiny, Dennis.Wu

reason: in the current BTT implimentation deepflush is always
used and deepflush is very expensive. Since customer already
know the ADR can protect the WPQ data in memory controller and
no need to call deepflush to get better performance. BTT w/o
deepflush, performance can improve 300%~600% with diff FIO jobs.

How: Add one param "no_deepflush" in the nfit module parameter.
if "modprob nfit no_deepflush=1", customer can get the higher
performance but not strict data security. Before modprob nfit,
you may need to "ndctl disable-region".

Next: In the BTT, use flag to control the data w/o deepflush
in the case "no_deepflush=0".

Signed-off-by: Dennis.Wu <dennis.wu@intel.com>
---
 drivers/acpi/nfit/core.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index e5d7f2bda13f..ec0ad48b0283 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -52,6 +52,10 @@ static bool force_labels;
 module_param(force_labels, bool, 0444);
 MODULE_PARM_DESC(force_labels, "Opt-in to labels despite missing methods");
 
+static bool no_deepflush;
+module_param(no_deepflush, bool, 0644);
+MODULE_PARM_DESC(no_deepflush, "skip deep flush if ADR or no strict security");
+
 LIST_HEAD(acpi_descs);
 DEFINE_MUTEX(acpi_desc_lock);
 
@@ -981,8 +985,10 @@ static void *add_table(struct acpi_nfit_desc *acpi_desc,
 			return err;
 		break;
 	case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
-		if (!add_flush(acpi_desc, prev, table))
-			return err;
+		if (!no_deepflush) {
+			if (!add_flush(acpi_desc, prev, table))
+				return err;
+		}
 		break;
 	case ACPI_NFIT_TYPE_SMBIOS:
 		dev_dbg(dev, "smbios\n");
-- 
2.27.0


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

end of thread, other threads:[~2022-10-20  6:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29  8:31 [PATCH] ACPI/NFIT: Add no_deepflush param to dynamic control flush operation Dennis.Wu
2022-06-29 15:27 ` Christoph Hellwig
2022-07-13  1:25   ` Dan Williams
2022-07-20  6:24     ` Christoph Hellwig
2022-09-20  3:08       ` Wu, Dennis
2022-09-20 11:46         ` Christoph Hellwig
2022-09-20 19:30       ` Dan Williams
2022-10-20  6:23         ` Wu, Dennis

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).