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 <[email protected]> --- 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
