linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm@ml01.01.org,
	Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] libnvdimm, region: sysfs trigger for nvdimm_flush()
Date: Wed, 26 Apr 2017 16:38:54 -0400	[thread overview]
Message-ID: <x49zif23nvl.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <149315140303.23340.14688142799059150805.stgit@dwillia2-desk3.amr.corp.intel.com> (Dan Williams's message of "Tue, 25 Apr 2017 13:17:37 -0700")

Dan Williams <dan.j.williams@intel.com> writes:

> 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. These requests are typically associated with filesystem
> metadata updates. However, when a namespace is in device-dax mode,
> userspace (think database metadata) needs another path to perform the
> same flushing. In other words this is not required to make data
> persistent, but in the case of metadata it allows for a smaller failure
> domain in the unlikely event of an ADR failure.
>
> The new 'flush' attribute is visible when the individual DIMMs backing a
> given interleave-set are described by platform firmware. In ACPI terms
> this is "NVDIMM Region Mapping Structures" and associated "Flush Hint
> Address Structures". Reads return "1" if the region supports triggering
> WPQ flushes on all DIMMs. Reads return "0" the flush operation is a
> platform nop, and in that case the attribute is read-only.

I can make peace with exposing this to userspace, though I am mostly
against its use.  However, sysfs feels like the wrong interface.
Believe it or not, I'd rather see this implemented as an ioctl.

This isn't a NACK, it's me giving my opinion.  Do with it what you will.

Cheers,
Jeff

  reply	other threads:[~2017-04-26 20:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 23:49 [PATCH v2 0/2] libnvdimm: export wpq flush interface Dan Williams
2017-04-24 23:49 ` [PATCH v2 1/2] libnvdimm, region: fix flush hint detection crash Dan Williams
2017-04-26 19:43   ` Jeff Moyer
2017-04-26 20:04     ` Dan Williams
2017-04-24 23:50 ` [PATCH v2 2/2] libnvdimm, region: sysfs trigger for nvdimm_flush() Dan Williams
2017-04-25 16:37   ` Ross Zwisler
2017-04-25 16:38     ` Dan Williams
2017-04-25 20:17   ` [PATCH v3] " Dan Williams
2017-04-26 20:38     ` Jeff Moyer [this message]
2017-04-26 23:00       ` Dan Williams
2017-04-27 13:45         ` Jeff Moyer
2017-04-27 16:56           ` Dan Williams
2017-04-27 18:41             ` Jeff Moyer
2017-04-27 19:17               ` Dan Williams
2017-04-27 19:21                 ` Dan Williams
2017-04-27 19:43                   ` Jeff Moyer
2017-04-27 19:40                 ` Jeff Moyer
2017-04-27 20:02                   ` Dan Williams
2017-04-27 21:36                     ` Dan Williams
2017-04-26 23:36       ` [PATCH v4] " Dan Williams
2017-04-27 22:17         ` [PATCH v5] " Dan Williams

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=x49zif23nvl.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=m.mizuma@jp.fujitsu.com \
    /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 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).