Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1629792

Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush()

From Dan Williams <dan.j.williams@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush()
Date 2017-04-24 19:10 +0200
Message-ID <tzPES-1jt-5@gated-at.bofh.it> (permalink)
References <tyQD0-3JK-7@gated-at.bofh.it> <tzPES-1jt-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Apr 24, 2017 at 10:03 AM, Linda Knippers <linda.knippers@hpe.com> wrote:
> On 04/21/2017 07:48 PM, Dan Williams wrote:
>> The nvdimm_flush() mechanism helps to reduce the impact of an ADR
>> (asynchronous-dimm-refresh) failure. The ADR mechanism handles flushing
>> platform WPQ (write-pending-queue) buffers when power is removed. The
>> nvdimm_flush() mechanism performs that same function on-demand.
>>
>> When a pmem namespace is associated with a block device, an
>> nvdimm_flush() is triggered with every block-layer REQ_FUA, or REQ_FLUSH
>> request. However, when a namespace is in device-dax mode, or namespaces
>> are disabled, userspace needs another path.
>
> Why would a user need to flush a disabled namespace?

For an application that wants to shutdown and sync. Basically I wanted
to make it clear that with this interface the buffers can be synced
regardless of any downstream namespace configuration or state.

>
>> The new 'flush' attribute is visible when it can be determined that the
>> interleave-set either does, or does not have DIMMs that expose WPQ-flush
>> addresses, "flush-hints" in ACPI NFIT terminology. It returns "1" and
>> flushes DIMMs, or returns "0" the flush operation is a platform nop.
>
> It seems a little odd to me that reading a read-only attribute both
> tells you that the device has flush hints and also triggers a flush.
> This means that anyone at any time can cause a flush.  Do we want that?

No, I'm making the change that Masayoshi-san suggested to move the
flush to a write operation... assuming we move forward given Jeff's
concern.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Dan Williams <dan.j.williams@intel.com> - 2017-04-22 02:00 +0200
  Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> - 2017-04-24 07:50 +0200
    Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Dan Williams <dan.j.williams@intel.com> - 2017-04-24 09:10 +0200
  Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Jeff Moyer <jmoyer@redhat.com> - 2017-04-24 18:30 +0200
    Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Dan Williams <dan.j.williams@intel.com> - 2017-04-24 18:40 +0200
      Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Jeff Moyer <jmoyer@redhat.com> - 2017-04-24 18:50 +0200
        Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Dan Williams <dan.j.williams@intel.com> - 2017-04-24 19:50 +0200
          Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Jeff Moyer <jmoyer@redhat.com> - 2017-04-24 20:00 +0200
  Re: [PATCH] libnvdimm, region: sysfs trigger for nvdimm_flush() Dan Williams <dan.j.williams@intel.com> - 2017-04-24 19:10 +0200

csiph-web