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\@lists.01.org" <linux-nvdimm@ml01.01.org>,
	Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] libnvdimm, region: sysfs trigger for nvdimm_flush()
Date: Thu, 27 Apr 2017 14:41:08 -0400	[thread overview]
Message-ID: <x49d1bxsngb.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <CAPcyv4jOP6fhk4wXahdEWH2O_93LQe9yzrWYZatSXXDwEk5OBA@mail.gmail.com> (Dan Williams's message of "Thu, 27 Apr 2017 09:56:44 -0700")

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

>> The sentiment is that programs shouldn't have to grovel around in sysfs
>> to do stuff related to an open file descriptor or mapping.  I don't take
>> issue with the name.  I do worry that something like 'wpq_drain' may be
>> too platform specific, though.  The NVM Programming Model specification
>> is going to call this "deep flush", so maybe that will give you
>> some inspiration if you do want to change the name.
>
> I'll change to "deep_flush", and I quibble that this is related to a
> single open file descriptor or mapping. It really is a "region flush"
> for giving extra protection for global metadata, but the persistence
> of individual fds or mappings is handled by ADR. I think an ioctl
> might give the false impression that every time you flush a cacheline
> to persistence you need to call the ioctl.

fsync, for example, may affect more than one fd--all data in the drive
write cache will be flushed.  I don't see how this is so different.  I
think a sysfs file is awkward because it requires an application to
chase down the correct file in the sysfs hierarchy.  If the application
already has an open fd or a mapping, it should be able to operate on
that.

As for confusion on when to use the interface, I think that's inevitable
no matter how it's implemented.  We're introducing a flush type that has
never been exposed before, and we're not giving any information on how
likely an ADR failure is, or how expensive this flush will be.

Cheers,
Jeff

  reply	other threads:[~2017-04-27 18:41 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
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 [this message]
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=x49d1bxsngb.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).