libnvdimm, pmem: use REQ_FUA, REQ_FLUSH for nvdimm_flush()
authorDan Williams <dan.j.williams@intel.com>
Thu, 2 Jun 2016 03:48:15 +0000 (20:48 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 11 Jul 2016 23:16:03 +0000 (16:16 -0700)
commit7e267a8c790edfde9b697cbe944ee566f41219c3
tree09133c8e81f5be702f649de096b5661419170418
parent0c27af60d1bbd33c7d3dffb46a4c9f6aa103d754
libnvdimm, pmem: use REQ_FUA, REQ_FLUSH for nvdimm_flush()

Given that nvdimm_flush() has higher overhead than wmb_pmem() (pointer
chasing through nd_region), and that we otherwise assume a platform has
ADR capability when flush hints are not present, move nvdimm_flush() to
REQ_FLUSH context.

Note that we still arrange for nvdimm_flush() to be called even in the
ADR case. We need at least once wmb() fence to push buffered writes in
the cpu out to the ADR protected domain.

Cc: Toshi Kani <toshi.kani@hpe.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pmem.c