All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-12 21:46 ` Dave Jiang
  0 siblings, 0 replies; 14+ messages in thread
From: Dave Jiang @ 2018-02-12 21:46 UTC (permalink / raw)
  To: dan.j.williams; +Cc: ross.zwisler, linux-kernel, linux-nvdimm

Re-enable deep flush so that users always have a way to be sure that a write
does make it all the way out to the NVDIMM. The PMEM driver writes always
make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
flush the write buffers on power failure. Deep flush is there to explicitly
flush those write buffers to protect against (rare) ADR failure.
This change prevents a regression in deep flush behavior so that applications
can continue to depend on fsync() as a mechanism to trigger deep flush in the
filesystem-dax case.

Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache flush on power loss")

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---

v2: Updated commit patch header from Dan's comments.

 drivers/nvdimm/pmem.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 10041ac4032c..06f8dcc52ca6 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -335,8 +335,7 @@ static int pmem_attach_disk(struct device *dev,
 		dev_warn(dev, "unable to guarantee persistence of writes\n");
 		fua = 0;
 	}
-	wbc = nvdimm_has_cache(nd_region) &&
-		!test_bit(ND_REGION_PERSIST_CACHE, &nd_region->flags);
+	wbc = nvdimm_has_cache(nd_region);
 
 	if (!devm_request_mem_region(dev, res->start, resource_size(res),
 				dev_name(&ndns->dev))) {

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-12 21:46 ` Dave Jiang
  0 siblings, 0 replies; 14+ messages in thread
From: Dave Jiang @ 2018-02-12 21:46 UTC (permalink / raw)
  To: dan.j.williams; +Cc: ross.zwisler, linux-kernel, linux-nvdimm

Re-enable deep flush so that users always have a way to be sure that a write
does make it all the way out to the NVDIMM. The PMEM driver writes always
make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
flush the write buffers on power failure. Deep flush is there to explicitly
flush those write buffers to protect against (rare) ADR failure.
This change prevents a regression in deep flush behavior so that applications
can continue to depend on fsync() as a mechanism to trigger deep flush in the
filesystem-dax case.

Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache flush on power loss")

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---

v2: Updated commit patch header from Dan's comments.

 drivers/nvdimm/pmem.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 10041ac4032c..06f8dcc52ca6 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -335,8 +335,7 @@ static int pmem_attach_disk(struct device *dev,
 		dev_warn(dev, "unable to guarantee persistence of writes\n");
 		fua = 0;
 	}
-	wbc = nvdimm_has_cache(nd_region) &&
-		!test_bit(ND_REGION_PERSIST_CACHE, &nd_region->flags);
+	wbc = nvdimm_has_cache(nd_region);
 
 	if (!devm_request_mem_region(dev, res->start, resource_size(res),
 				dev_name(&ndns->dev))) {

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
  2018-02-12 21:46 ` Dave Jiang
@ 2018-02-12 22:49   ` Dan Williams
  -1 siblings, 0 replies; 14+ messages in thread
From: Dan Williams @ 2018-02-12 22:49 UTC (permalink / raw)
  To: Dave Jiang; +Cc: Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Mon, Feb 12, 2018 at 1:46 PM, Dave Jiang <dave.jiang@intel.com> wrote:
> Re-enable deep flush so that users always have a way to be sure that a write
> does make it all the way out to the NVDIMM. The PMEM driver writes always
> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
> flush the write buffers on power failure. Deep flush is there to explicitly
> flush those write buffers to protect against (rare) ADR failure.
> This change prevents a regression in deep flush behavior so that applications
> can continue to depend on fsync() as a mechanism to trigger deep flush in the
> filesystem-dax case.
>
> Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache flush on power loss")
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>

Thanks Dave, applied.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-12 22:49   ` Dan Williams
  0 siblings, 0 replies; 14+ messages in thread
From: Dan Williams @ 2018-02-12 22:49 UTC (permalink / raw)
  To: Dave Jiang; +Cc: Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Mon, Feb 12, 2018 at 1:46 PM, Dave Jiang <dave.jiang@intel.com> wrote:
> Re-enable deep flush so that users always have a way to be sure that a write
> does make it all the way out to the NVDIMM. The PMEM driver writes always
> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
> flush the write buffers on power failure. Deep flush is there to explicitly
> flush those write buffers to protect against (rare) ADR failure.
> This change prevents a regression in deep flush behavior so that applications
> can continue to depend on fsync() as a mechanism to trigger deep flush in the
> filesystem-dax case.
>
> Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache flush on power loss")
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>

Thanks Dave, applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
  2018-02-12 21:46 ` Dave Jiang
@ 2018-02-12 22:53   ` Jeff Moyer
  -1 siblings, 0 replies; 14+ messages in thread
From: Jeff Moyer @ 2018-02-12 22:53 UTC (permalink / raw)
  To: Dave Jiang; +Cc: ross.zwisler, linux-kernel, linux-nvdimm

Dave Jiang <dave.jiang@intel.com> writes:

> Re-enable deep flush so that users always have a way to be sure that a write
> does make it all the way out to the NVDIMM. The PMEM driver writes always
> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
> flush the write buffers on power failure. Deep flush is there to explicitly
> flush those write buffers to protect against (rare) ADR failure.
> This change prevents a regression in deep flush behavior so that applications
> can continue to depend on fsync() as a mechanism to trigger deep flush in the
> filesystem-dax case.

That's still very confusing text.  Specifically, the part where you say
that pmem driver writes always make it to the DIMM.  I think the
changelog could start with "Deep flush is there to explicitly flush
write buffers...."  Anyway, the fix looks right to me.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-12 22:53   ` Jeff Moyer
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Moyer @ 2018-02-12 22:53 UTC (permalink / raw)
  To: Dave Jiang; +Cc: dan.j.williams, ross.zwisler, linux-kernel, linux-nvdimm

Dave Jiang <dave.jiang@intel.com> writes:

> Re-enable deep flush so that users always have a way to be sure that a write
> does make it all the way out to the NVDIMM. The PMEM driver writes always
> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
> flush the write buffers on power failure. Deep flush is there to explicitly
> flush those write buffers to protect against (rare) ADR failure.
> This change prevents a regression in deep flush behavior so that applications
> can continue to depend on fsync() as a mechanism to trigger deep flush in the
> filesystem-dax case.

That's still very confusing text.  Specifically, the part where you say
that pmem driver writes always make it to the DIMM.  I think the
changelog could start with "Deep flush is there to explicitly flush
write buffers...."  Anyway, the fix looks right to me.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
  2018-02-12 22:53   ` Jeff Moyer
@ 2018-02-12 23:05     ` Dan Williams
  -1 siblings, 0 replies; 14+ messages in thread
From: Dan Williams @ 2018-02-12 23:05 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
> Dave Jiang <dave.jiang@intel.com> writes:
>
>> Re-enable deep flush so that users always have a way to be sure that a write
>> does make it all the way out to the NVDIMM. The PMEM driver writes always
>> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
>> flush the write buffers on power failure. Deep flush is there to explicitly
>> flush those write buffers to protect against (rare) ADR failure.
>> This change prevents a regression in deep flush behavior so that applications
>> can continue to depend on fsync() as a mechanism to trigger deep flush in the
>> filesystem-dax case.
>
> That's still very confusing text.  Specifically, the part where you say
> that pmem driver writes always make it to the DIMM.  I think the
> changelog could start with "Deep flush is there to explicitly flush
> write buffers...."  Anyway, the fix looks right to me.

I ended up changing the commit message to this, let me know if it reads better:


    libnvdimm: re-enable deep flush for pmem devices via fsync()

    Re-enable deep flush so that users always have a way to be sure that a
    write makes it all the way out to media. The PMEM driver writes always
    arrive at the NVDIMM, and it relies on the ADR (Asynchronous DRAM
    Refresh) mechanism to flush the write buffers on power failure. Deep
    flush is there to explicitly flush those write buffers to protect
    against (rare) ADR failure.  This change prevents a regression in deep
    flush behavior so that applications can continue to depend on fsync() as
    a mechanism to trigger deep flush in the filesystem-DAX case.

    Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform
CPU cache...")
    Signed-off-by: Dave Jiang <dave.jiang@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-12 23:05     ` Dan Williams
  0 siblings, 0 replies; 14+ messages in thread
From: Dan Williams @ 2018-02-12 23:05 UTC (permalink / raw)
  To: Jeff Moyer
  Cc: Dave Jiang, Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
> Dave Jiang <dave.jiang@intel.com> writes:
>
>> Re-enable deep flush so that users always have a way to be sure that a write
>> does make it all the way out to the NVDIMM. The PMEM driver writes always
>> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
>> flush the write buffers on power failure. Deep flush is there to explicitly
>> flush those write buffers to protect against (rare) ADR failure.
>> This change prevents a regression in deep flush behavior so that applications
>> can continue to depend on fsync() as a mechanism to trigger deep flush in the
>> filesystem-dax case.
>
> That's still very confusing text.  Specifically, the part where you say
> that pmem driver writes always make it to the DIMM.  I think the
> changelog could start with "Deep flush is there to explicitly flush
> write buffers...."  Anyway, the fix looks right to me.

I ended up changing the commit message to this, let me know if it reads better:


    libnvdimm: re-enable deep flush for pmem devices via fsync()

    Re-enable deep flush so that users always have a way to be sure that a
    write makes it all the way out to media. The PMEM driver writes always
    arrive at the NVDIMM, and it relies on the ADR (Asynchronous DRAM
    Refresh) mechanism to flush the write buffers on power failure. Deep
    flush is there to explicitly flush those write buffers to protect
    against (rare) ADR failure.  This change prevents a regression in deep
    flush behavior so that applications can continue to depend on fsync() as
    a mechanism to trigger deep flush in the filesystem-DAX case.

    Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform
CPU cache...")
    Signed-off-by: Dave Jiang <dave.jiang@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
  2018-02-12 23:05     ` Dan Williams
@ 2018-02-12 23:08       ` Ross Zwisler
  -1 siblings, 0 replies; 14+ messages in thread
From: Ross Zwisler @ 2018-02-12 23:08 UTC (permalink / raw)
  To: Dan Williams; +Cc: Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Mon, Feb 12, 2018 at 03:05:10PM -0800, Dan Williams wrote:
> On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
> > Dave Jiang <dave.jiang@intel.com> writes:
> >
> >> Re-enable deep flush so that users always have a way to be sure that a write
> >> does make it all the way out to the NVDIMM. The PMEM driver writes always
> >> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
> >> flush the write buffers on power failure. Deep flush is there to explicitly
> >> flush those write buffers to protect against (rare) ADR failure.
> >> This change prevents a regression in deep flush behavior so that applications
> >> can continue to depend on fsync() as a mechanism to trigger deep flush in the
> >> filesystem-dax case.
> >
> > That's still very confusing text.  Specifically, the part where you say
> > that pmem driver writes always make it to the DIMM.  I think the
> > changelog could start with "Deep flush is there to explicitly flush
> > write buffers...."  Anyway, the fix looks right to me.
> 
> I ended up changing the commit message to this, let me know if it reads better:
> 
> 
>     libnvdimm: re-enable deep flush for pmem devices via fsync()
> 
>     Re-enable deep flush so that users always have a way to be sure that a
>     write makes it all the way out to media. The PMEM driver writes always
>     arrive at the NVDIMM, and it relies on the ADR (Asynchronous DRAM
>     Refresh) mechanism to flush the write buffers on power failure. Deep
>     flush is there to explicitly flush those write buffers to protect
>     against (rare) ADR failure.  This change prevents a regression in deep
>     flush behavior so that applications can continue to depend on fsync() as
>     a mechanism to trigger deep flush in the filesystem-DAX case.
> 
>     Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform
> CPU cache...")
>     Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Plus Jeff's reviewed-by.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-12 23:08       ` Ross Zwisler
  0 siblings, 0 replies; 14+ messages in thread
From: Ross Zwisler @ 2018-02-12 23:08 UTC (permalink / raw)
  To: Dan Williams
  Cc: Jeff Moyer, Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Mon, Feb 12, 2018 at 03:05:10PM -0800, Dan Williams wrote:
> On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
> > Dave Jiang <dave.jiang@intel.com> writes:
> >
> >> Re-enable deep flush so that users always have a way to be sure that a write
> >> does make it all the way out to the NVDIMM. The PMEM driver writes always
> >> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
> >> flush the write buffers on power failure. Deep flush is there to explicitly
> >> flush those write buffers to protect against (rare) ADR failure.
> >> This change prevents a regression in deep flush behavior so that applications
> >> can continue to depend on fsync() as a mechanism to trigger deep flush in the
> >> filesystem-dax case.
> >
> > That's still very confusing text.  Specifically, the part where you say
> > that pmem driver writes always make it to the DIMM.  I think the
> > changelog could start with "Deep flush is there to explicitly flush
> > write buffers...."  Anyway, the fix looks right to me.
> 
> I ended up changing the commit message to this, let me know if it reads better:
> 
> 
>     libnvdimm: re-enable deep flush for pmem devices via fsync()
> 
>     Re-enable deep flush so that users always have a way to be sure that a
>     write makes it all the way out to media. The PMEM driver writes always
>     arrive at the NVDIMM, and it relies on the ADR (Asynchronous DRAM
>     Refresh) mechanism to flush the write buffers on power failure. Deep
>     flush is there to explicitly flush those write buffers to protect
>     against (rare) ADR failure.  This change prevents a regression in deep
>     flush behavior so that applications can continue to depend on fsync() as
>     a mechanism to trigger deep flush in the filesystem-DAX case.
> 
>     Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform
> CPU cache...")
>     Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Plus Jeff's reviewed-by.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
  2018-02-12 23:05     ` Dan Williams
@ 2018-02-13 13:17       ` Jeff Moyer
  -1 siblings, 0 replies; 14+ messages in thread
From: Jeff Moyer @ 2018-02-13 13:17 UTC (permalink / raw)
  To: Dan Williams; +Cc: Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

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

> On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
>> Dave Jiang <dave.jiang@intel.com> writes:
>>
>>> Re-enable deep flush so that users always have a way to be sure that a write
>>> does make it all the way out to the NVDIMM. The PMEM driver writes always
>>> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
>>> flush the write buffers on power failure. Deep flush is there to explicitly
>>> flush those write buffers to protect against (rare) ADR failure.
>>> This change prevents a regression in deep flush behavior so that applications
>>> can continue to depend on fsync() as a mechanism to trigger deep flush in the
>>> filesystem-dax case.
>>
>> That's still very confusing text.  Specifically, the part where you say
>> that pmem driver writes always make it to the DIMM.  I think the
>> changelog could start with "Deep flush is there to explicitly flush
>> write buffers...."  Anyway, the fix looks right to me.
>
> I ended up changing the commit message to this, let me know if it reads better:

Thanks.  It's still unclear to me what the text, "The PMEM driver writes
always arrive at the NVDIMM" means.  However, it's good enough.

Thanks!
Jeff

>
>     libnvdimm: re-enable deep flush for pmem devices via fsync()
>
>     Re-enable deep flush so that users always have a way to be sure that a
>     write makes it all the way out to media. The PMEM driver writes always
>     arrive at the NVDIMM, and it relies on the ADR (Asynchronous DRAM
>     Refresh) mechanism to flush the write buffers on power failure. Deep
>     flush is there to explicitly flush those write buffers to protect
>     against (rare) ADR failure.  This change prevents a regression in deep
>     flush behavior so that applications can continue to depend on fsync() as
>     a mechanism to trigger deep flush in the filesystem-DAX case.
>
>     Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform
> CPU cache...")
>     Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-13 13:17       ` Jeff Moyer
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Moyer @ 2018-02-13 13:17 UTC (permalink / raw)
  To: Dan Williams
  Cc: Dave Jiang, Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

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

> On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
>> Dave Jiang <dave.jiang@intel.com> writes:
>>
>>> Re-enable deep flush so that users always have a way to be sure that a write
>>> does make it all the way out to the NVDIMM. The PMEM driver writes always
>>> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
>>> flush the write buffers on power failure. Deep flush is there to explicitly
>>> flush those write buffers to protect against (rare) ADR failure.
>>> This change prevents a regression in deep flush behavior so that applications
>>> can continue to depend on fsync() as a mechanism to trigger deep flush in the
>>> filesystem-dax case.
>>
>> That's still very confusing text.  Specifically, the part where you say
>> that pmem driver writes always make it to the DIMM.  I think the
>> changelog could start with "Deep flush is there to explicitly flush
>> write buffers...."  Anyway, the fix looks right to me.
>
> I ended up changing the commit message to this, let me know if it reads better:

Thanks.  It's still unclear to me what the text, "The PMEM driver writes
always arrive at the NVDIMM" means.  However, it's good enough.

Thanks!
Jeff

>
>     libnvdimm: re-enable deep flush for pmem devices via fsync()
>
>     Re-enable deep flush so that users always have a way to be sure that a
>     write makes it all the way out to media. The PMEM driver writes always
>     arrive at the NVDIMM, and it relies on the ADR (Asynchronous DRAM
>     Refresh) mechanism to flush the write buffers on power failure. Deep
>     flush is there to explicitly flush those write buffers to protect
>     against (rare) ADR failure.  This change prevents a regression in deep
>     flush behavior so that applications can continue to depend on fsync() as
>     a mechanism to trigger deep flush in the filesystem-DAX case.
>
>     Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform
> CPU cache...")
>     Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
  2018-02-13 13:17       ` Jeff Moyer
@ 2018-02-13 15:57         ` Dan Williams
  -1 siblings, 0 replies; 14+ messages in thread
From: Dan Williams @ 2018-02-13 15:57 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Tue, Feb 13, 2018 at 5:17 AM, Jeff Moyer <jmoyer@redhat.com> wrote:
> Dan Williams <dan.j.williams@intel.com> writes:
>
>> On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
>>> Dave Jiang <dave.jiang@intel.com> writes:
>>>
>>>> Re-enable deep flush so that users always have a way to be sure that a write
>>>> does make it all the way out to the NVDIMM. The PMEM driver writes always
>>>> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
>>>> flush the write buffers on power failure. Deep flush is there to explicitly
>>>> flush those write buffers to protect against (rare) ADR failure.
>>>> This change prevents a regression in deep flush behavior so that applications
>>>> can continue to depend on fsync() as a mechanism to trigger deep flush in the
>>>> filesystem-dax case.
>>>
>>> That's still very confusing text.  Specifically, the part where you say
>>> that pmem driver writes always make it to the DIMM.  I think the
>>> changelog could start with "Deep flush is there to explicitly flush
>>> write buffers...."  Anyway, the fix looks right to me.
>>
>> I ended up changing the commit message to this, let me know if it reads better:
>
> Thanks.  It's still unclear to me what the text, "The PMEM driver writes
> always arrive at the NVDIMM" means.  However, it's good enough.

Yeah, Dave, had similar feedback. A better way of saying it is that
the writes always arrive at the persistence domain, but deep flush
pushes them to the smallest platform failure domain. On current
platforms that's to the ADR domain and past the ADR domain.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices
@ 2018-02-13 15:57         ` Dan Williams
  0 siblings, 0 replies; 14+ messages in thread
From: Dan Williams @ 2018-02-13 15:57 UTC (permalink / raw)
  To: Jeff Moyer
  Cc: Dave Jiang, Zwisler, Ross, Linux Kernel Mailing List, linux-nvdimm

On Tue, Feb 13, 2018 at 5:17 AM, Jeff Moyer <jmoyer@redhat.com> wrote:
> Dan Williams <dan.j.williams@intel.com> writes:
>
>> On Mon, Feb 12, 2018 at 2:53 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
>>> Dave Jiang <dave.jiang@intel.com> writes:
>>>
>>>> Re-enable deep flush so that users always have a way to be sure that a write
>>>> does make it all the way out to the NVDIMM. The PMEM driver writes always
>>>> make it "all the way to the NVDIMM", and it relies on the ADR mechanism to
>>>> flush the write buffers on power failure. Deep flush is there to explicitly
>>>> flush those write buffers to protect against (rare) ADR failure.
>>>> This change prevents a regression in deep flush behavior so that applications
>>>> can continue to depend on fsync() as a mechanism to trigger deep flush in the
>>>> filesystem-dax case.
>>>
>>> That's still very confusing text.  Specifically, the part where you say
>>> that pmem driver writes always make it to the DIMM.  I think the
>>> changelog could start with "Deep flush is there to explicitly flush
>>> write buffers...."  Anyway, the fix looks right to me.
>>
>> I ended up changing the commit message to this, let me know if it reads better:
>
> Thanks.  It's still unclear to me what the text, "The PMEM driver writes
> always arrive at the NVDIMM" means.  However, it's good enough.

Yeah, Dave, had similar feedback. A better way of saying it is that
the writes always arrive at the persistence domain, but deep flush
pushes them to the smallest platform failure domain. On current
platforms that's to the ADR domain and past the ADR domain.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-02-13 15:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 21:46 [PATCH v2] libnvdimm: re-enable deep flush for pmem devices Dave Jiang
2018-02-12 21:46 ` Dave Jiang
2018-02-12 22:49 ` Dan Williams
2018-02-12 22:49   ` Dan Williams
2018-02-12 22:53 ` Jeff Moyer
2018-02-12 22:53   ` Jeff Moyer
2018-02-12 23:05   ` Dan Williams
2018-02-12 23:05     ` Dan Williams
2018-02-12 23:08     ` Ross Zwisler
2018-02-12 23:08       ` Ross Zwisler
2018-02-13 13:17     ` Jeff Moyer
2018-02-13 13:17       ` Jeff Moyer
2018-02-13 15:57       ` Dan Williams
2018-02-13 15:57         ` Dan Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.