All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Boaz Harrosh <boaz@plexistor.com>,
	"Kani, Toshimitsu" <toshi.kani@hp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 14/15] libnvdimm: support read-only btt backing devices
Date: Mon, 22 Jun 2015 00:17:29 -0700	[thread overview]
Message-ID: <CAPcyv4hmYiU5Gzmz8prPCESOYGn099-TffFTZH0E2OAx+JzkTQ@mail.gmail.com> (raw)
In-Reply-To: <20150622063028.GA30434@lst.de>

On Sun, Jun 21, 2015 at 11:30 PM, Christoph Hellwig <hch@lst.de> wrote:
> On Sun, Jun 21, 2015 at 08:11:25AM -0700, Dan Williams wrote:
>> The labels only allow allocation of persistent media between pmem and
>> blk.  For a given dimm you may access in either mode and the label
>> records the decision.  We can have a btt on either the pmem or
>> blk-mode disk type, or partition thereof.
>
> Sounds like the spec should allow a btt type as well insteaad of
> requiring the OS to work around it, as that seems to be one of the few
> useful things to do with a run-time label.

To be fair the namespace was initially envisioned to be btt enabled or
not, and hide the raw media device.  It was only when we added the
"XFS needs BTT so we need BTT support on partitions" constraint did I
push stacked BTT as the most flexible way to handle all these
configurations.  It also simplified the namespace to only be a
partition of access modes and leave sub-dividing pmem to standard
partitions.

> Either way, partitions are trivial things and we could add them to the
> nvdimm layer.
>
>> Yes, it's this hybrid thing that mostly fits into the existing block
>> device model save for two new block_device_operations
>> ->direct_access() and ->rw_bytes().  We then use property of a
>> block_device that allows it to be claimed for exclusive ownership by a
>> filesystem or another block_device to layer storage semantics on top
>> be it files+directories, raid, caching, or atomic sectors.  NVDIMM
>> devices don't present the same complexity as MTD devices.  The only
>> complexity they present is byte-address-ability, not erase-block-size,
>> wear-leveling, etc...
>
> I didn't say they show the same complexities, but the same layering.
>
>> Good to hear that we don't need BTT for XFS v5, can we make the
>> guarantee for all filesystems that may want to support DAX?  I still
>> think stacking is a natural fit for this problem.
>
> I can't make any guarantees, especially not without verification.  But
> if correctly implemented any filesystems that does out of place metadata
> writes (and that includes a traditional log) and uses checksum to ensure
> the integrity of these updates it should be fine.  You'd still have
> the issue of sector atomicy of file I/O though.

If someone needs sector atomicity of file I/O then by definition they
can't have DAX enabled.

There's no guarantee that these drivers are only ever paired with
XFSv5.  Drivers tend to be backported more freely than filesystems.  I
don't think the need for BTT on partitions will go away, but if you're
not convinced we could try the wait and see approach and move BTT to
only be enabled at namespace boundaries.  That's a fairly invasive
change to the configuration model, I'd hate to come back in a few
months to re-add BTT on partition support alongside the namespace only
mode.  Not trying to throw FUD, I'm willing to admit there are
downsides to the stacking model, they're just not clear to me
presently.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Boaz Harrosh <boaz@plexistor.com>,
	"Kani, Toshimitsu" <toshi.kani@hp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 14/15] libnvdimm: support read-only btt backing devices
Date: Mon, 22 Jun 2015 00:17:29 -0700	[thread overview]
Message-ID: <CAPcyv4hmYiU5Gzmz8prPCESOYGn099-TffFTZH0E2OAx+JzkTQ@mail.gmail.com> (raw)
In-Reply-To: <20150622063028.GA30434@lst.de>

On Sun, Jun 21, 2015 at 11:30 PM, Christoph Hellwig <hch@lst.de> wrote:
> On Sun, Jun 21, 2015 at 08:11:25AM -0700, Dan Williams wrote:
>> The labels only allow allocation of persistent media between pmem and
>> blk.  For a given dimm you may access in either mode and the label
>> records the decision.  We can have a btt on either the pmem or
>> blk-mode disk type, or partition thereof.
>
> Sounds like the spec should allow a btt type as well insteaad of
> requiring the OS to work around it, as that seems to be one of the few
> useful things to do with a run-time label.

To be fair the namespace was initially envisioned to be btt enabled or
not, and hide the raw media device.  It was only when we added the
"XFS needs BTT so we need BTT support on partitions" constraint did I
push stacked BTT as the most flexible way to handle all these
configurations.  It also simplified the namespace to only be a
partition of access modes and leave sub-dividing pmem to standard
partitions.

> Either way, partitions are trivial things and we could add them to the
> nvdimm layer.
>
>> Yes, it's this hybrid thing that mostly fits into the existing block
>> device model save for two new block_device_operations
>> ->direct_access() and ->rw_bytes().  We then use property of a
>> block_device that allows it to be claimed for exclusive ownership by a
>> filesystem or another block_device to layer storage semantics on top
>> be it files+directories, raid, caching, or atomic sectors.  NVDIMM
>> devices don't present the same complexity as MTD devices.  The only
>> complexity they present is byte-address-ability, not erase-block-size,
>> wear-leveling, etc...
>
> I didn't say they show the same complexities, but the same layering.
>
>> Good to hear that we don't need BTT for XFS v5, can we make the
>> guarantee for all filesystems that may want to support DAX?  I still
>> think stacking is a natural fit for this problem.
>
> I can't make any guarantees, especially not without verification.  But
> if correctly implemented any filesystems that does out of place metadata
> writes (and that includes a traditional log) and uses checksum to ensure
> the integrity of these updates it should be fine.  You'd still have
> the issue of sector atomicy of file I/O though.

If someone needs sector atomicity of file I/O then by definition they
can't have DAX enabled.

There's no guarantee that these drivers are only ever paired with
XFSv5.  Drivers tend to be backported more freely than filesystems.  I
don't think the need for BTT on partitions will go away, but if you're
not convinced we could try the wait and see approach and move BTT to
only be enabled at namespace boundaries.  That's a fairly invasive
change to the configuration model, I'd hate to come back in a few
months to re-add BTT on partition support alongside the namespace only
mode.  Not trying to throw FUD, I'm willing to admit there are
downsides to the stacking model, they're just not clear to me
presently.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	Boaz Harrosh <boaz@plexistor.com>,
	"Kani, Toshimitsu" <toshi.kani@hp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 14/15] libnvdimm: support read-only btt backing devices
Date: Mon, 22 Jun 2015 00:17:29 -0700	[thread overview]
Message-ID: <CAPcyv4hmYiU5Gzmz8prPCESOYGn099-TffFTZH0E2OAx+JzkTQ@mail.gmail.com> (raw)
In-Reply-To: <20150622063028.GA30434@lst.de>

On Sun, Jun 21, 2015 at 11:30 PM, Christoph Hellwig <hch@lst.de> wrote:
> On Sun, Jun 21, 2015 at 08:11:25AM -0700, Dan Williams wrote:
>> The labels only allow allocation of persistent media between pmem and
>> blk.  For a given dimm you may access in either mode and the label
>> records the decision.  We can have a btt on either the pmem or
>> blk-mode disk type, or partition thereof.
>
> Sounds like the spec should allow a btt type as well insteaad of
> requiring the OS to work around it, as that seems to be one of the few
> useful things to do with a run-time label.

To be fair the namespace was initially envisioned to be btt enabled or
not, and hide the raw media device.  It was only when we added the
"XFS needs BTT so we need BTT support on partitions" constraint did I
push stacked BTT as the most flexible way to handle all these
configurations.  It also simplified the namespace to only be a
partition of access modes and leave sub-dividing pmem to standard
partitions.

> Either way, partitions are trivial things and we could add them to the
> nvdimm layer.
>
>> Yes, it's this hybrid thing that mostly fits into the existing block
>> device model save for two new block_device_operations
>> ->direct_access() and ->rw_bytes().  We then use property of a
>> block_device that allows it to be claimed for exclusive ownership by a
>> filesystem or another block_device to layer storage semantics on top
>> be it files+directories, raid, caching, or atomic sectors.  NVDIMM
>> devices don't present the same complexity as MTD devices.  The only
>> complexity they present is byte-address-ability, not erase-block-size,
>> wear-leveling, etc...
>
> I didn't say they show the same complexities, but the same layering.
>
>> Good to hear that we don't need BTT for XFS v5, can we make the
>> guarantee for all filesystems that may want to support DAX?  I still
>> think stacking is a natural fit for this problem.
>
> I can't make any guarantees, especially not without verification.  But
> if correctly implemented any filesystems that does out of place metadata
> writes (and that includes a traditional log) and uses checksum to ensure
> the integrity of these updates it should be fine.  You'd still have
> the issue of sector atomicy of file I/O though.

If someone needs sector atomicity of file I/O then by definition they
can't have DAX enabled.

There's no guarantee that these drivers are only ever paired with
XFSv5.  Drivers tend to be backported more freely than filesystems.  I
don't think the need for BTT on partitions will go away, but if you're
not convinced we could try the wait and see approach and move BTT to
only be enabled at namespace boundaries.  That's a fairly invasive
change to the configuration model, I'd hate to come back in a few
months to re-add BTT on partition support alongside the namespace only
mode.  Not trying to throw FUD, I'm willing to admit there are
downsides to the stacking model, they're just not clear to me
presently.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2015-06-22  7:17 UTC|newest]

Thread overview: 164+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 23:54 [PATCH 00/15] libnvdimm: ->rw_bytes(), BLK-mode, unit tests, and misc features Dan Williams
2015-06-17 23:54 ` Dan Williams
2015-06-17 23:54 ` [PATCH 01/15] block: introduce an ->rw_bytes() block device operation Dan Williams
2015-06-17 23:54   ` Dan Williams
2015-06-18 19:25   ` Dan Williams
2015-06-18 19:25     ` Dan Williams
2015-06-17 23:54 ` [PATCH 02/15] libnvdimm: infrastructure for btt devices Dan Williams
2015-06-17 23:54   ` Dan Williams
2015-06-22 16:34   ` Christoph Hellwig
2015-06-22 16:34     ` Christoph Hellwig
2015-06-22 16:48     ` Dan Williams
2015-06-22 16:48       ` Dan Williams
2015-06-22 16:48       ` Christoph Hellwig
2015-06-22 16:48         ` Christoph Hellwig
2015-06-22 16:48         ` Christoph Hellwig
2015-06-22 18:32         ` Jeff Moyer
2015-06-22 18:32           ` Jeff Moyer
2015-06-22 18:32           ` Jeff Moyer
2015-06-22 19:02           ` Dan Williams
2015-06-22 19:02             ` Dan Williams
2015-06-22 19:02             ` Dan Williams
2015-06-22 19:09             ` Jeff Moyer
2015-06-22 19:09               ` Jeff Moyer
2015-06-22 19:09               ` Jeff Moyer
2015-06-23 10:20               ` Christoph Hellwig
2015-06-23 10:19             ` Christoph Hellwig
2015-06-23 15:19               ` Dan Williams
2015-06-23 20:33                 ` Dan Williams
2015-06-24 12:10                 ` Christoph Hellwig
2015-06-23 10:10           ` Christoph Hellwig
2015-06-17 23:55 ` [PATCH 03/15] nd_btt: atomic sector updates Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-21 10:03   ` Christoph Hellwig
2015-06-21 10:03     ` Christoph Hellwig
2015-06-21 10:03     ` Christoph Hellwig
2015-06-21 16:31     ` Dan Williams
2015-06-21 16:31       ` Dan Williams
2015-06-17 23:55 ` [PATCH 04/15] libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-21 10:05   ` Christoph Hellwig
2015-06-21 10:05     ` Christoph Hellwig
2015-06-21 10:05     ` Christoph Hellwig
2015-06-21 13:31     ` Dan Williams
2015-06-21 13:31       ` Dan Williams
2015-06-21 13:56       ` Christoph Hellwig
2015-06-21 13:56         ` Christoph Hellwig
2015-06-21 13:56         ` Christoph Hellwig
2015-06-21 14:39         ` Dan Williams
2015-06-21 14:39           ` Dan Williams
2015-06-21 14:39           ` Dan Williams
2015-06-17 23:55 ` [PATCH 05/15] tools/testing/nvdimm: libnvdimm unit test infrastructure Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-17 23:55 ` [PATCH 06/15] libnvdimm: Non-Volatile Devices Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-17 23:55 ` [PATCH 07/15] fs/block_dev.c: skip rw_page if bdev has integrity Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-17 23:55 ` [PATCH 08/15] libnvdimm, btt: add support for blk integrity Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-17 23:55 ` [PATCH 09/15] libnvdimm, blk: " Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-17 23:55 ` [PATCH 10/15] libnvdimm: fix up max_hw_sectors Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-21 10:08   ` Christoph Hellwig
2015-06-21 10:08     ` Christoph Hellwig
2015-06-21 10:08     ` Christoph Hellwig
2015-06-21 13:28     ` Dan Williams
2015-06-21 13:28       ` Dan Williams
2015-06-17 23:55 ` [PATCH 11/15] libnvdimm: pmem, blk, and btt make_request cleanups Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-21 10:10   ` Christoph Hellwig
2015-06-21 10:10     ` Christoph Hellwig
2015-06-21 13:26     ` Dan Williams
2015-06-21 13:26       ` Dan Williams
2015-06-21 13:26       ` Dan Williams
2015-06-17 23:55 ` [PATCH 12/15] libnvdimm: enable iostat Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-19  8:34   ` Christoph Hellwig
2015-06-19  8:34     ` Christoph Hellwig
2015-06-19  9:02     ` Dan Williams
2015-06-19  9:02       ` Dan Williams
2015-06-21 10:11       ` Christoph Hellwig
2015-06-21 10:11         ` Christoph Hellwig
2015-06-21 13:22         ` Dan Williams
2015-06-21 13:22           ` Dan Williams
2015-06-21 13:22           ` Dan Williams
2015-06-17 23:55 ` [PATCH 13/15] libnvdimm: flag libnvdimm block devices as non-rotational Dan Williams
2015-06-17 23:55   ` Dan Williams
2015-06-17 23:56 ` [PATCH 14/15] libnvdimm: support read-only btt backing devices Dan Williams
2015-06-17 23:56   ` Dan Williams
2015-06-18 22:55   ` Vishal Verma
2015-06-18 22:55     ` Vishal Verma
2015-06-21 10:13   ` Christoph Hellwig
2015-06-21 10:13     ` Christoph Hellwig
2015-06-21 13:21     ` Dan Williams
2015-06-21 13:21       ` Dan Williams
2015-06-21 13:21       ` Dan Williams
2015-06-21 13:54       ` Christoph Hellwig
2015-06-21 13:54         ` Christoph Hellwig
2015-06-21 13:54         ` Christoph Hellwig
2015-06-21 15:11         ` Dan Williams
2015-06-21 15:11           ` Dan Williams
2015-06-22  6:30           ` Christoph Hellwig
2015-06-22  6:30             ` Christoph Hellwig
2015-06-22  6:30             ` Christoph Hellwig
2015-06-22  7:17             ` Dan Williams [this message]
2015-06-22  7:17               ` Dan Williams
2015-06-22  7:17               ` Dan Williams
2015-06-22  7:28               ` Christoph Hellwig
2015-06-22  7:28                 ` Christoph Hellwig
2015-06-22  7:28                 ` Christoph Hellwig
2015-06-22  7:39                 ` Dan Williams
2015-06-22  7:39                   ` Dan Williams
2015-06-22  7:39                   ` Dan Williams
2015-06-22 15:02                   ` Jeff Moyer
2015-06-22 15:02                     ` Jeff Moyer
2015-06-22 15:02                     ` Jeff Moyer
2015-06-22 15:41                     ` Christoph Hellwig
2015-06-22 15:41                       ` Christoph Hellwig
2015-06-22 15:41                       ` Christoph Hellwig
2015-06-22 16:00                       ` Jeff Moyer
2015-06-22 16:00                         ` Jeff Moyer
2015-06-22 16:00                         ` Jeff Moyer
2015-06-22 16:32                         ` Christoph Hellwig
2015-06-22 16:32                           ` Christoph Hellwig
2015-06-22 16:32                           ` Christoph Hellwig
2015-06-22 16:42                           ` Jeff Moyer
2015-06-22 16:42                             ` Jeff Moyer
2015-06-22 16:42                             ` Jeff Moyer
2015-06-22 16:48                             ` Christoph Hellwig
2015-06-22 16:48                               ` Christoph Hellwig
2015-06-22 16:48                               ` Christoph Hellwig
2015-06-22 18:48                               ` Jeff Moyer
2015-06-22 18:48                                 ` Jeff Moyer
2015-06-22 18:48                                 ` Jeff Moyer
2015-06-22 19:04                                 ` Dan Williams
2015-06-22 19:04                                   ` Dan Williams
2015-06-22 19:11                                   ` Jeff Moyer
2015-06-22 19:11                                     ` Jeff Moyer
2015-06-22 19:11                                     ` Jeff Moyer
2015-06-23 10:10                                 ` Christoph Hellwig
2015-06-23 10:10                                   ` Christoph Hellwig
2015-06-22 15:40                   ` Christoph Hellwig
2015-06-22 15:40                     ` Christoph Hellwig
2015-06-22 15:40                     ` Christoph Hellwig
2015-06-22 16:36                     ` Dan Williams
2015-06-22 16:36                       ` Dan Williams
2015-06-22 16:36                       ` Dan Williams
2015-06-22 16:45                       ` Christoph Hellwig
2015-06-22 16:45                         ` Christoph Hellwig
2015-06-22 16:45                         ` Christoph Hellwig
2015-06-22 16:54                         ` Dan Williams
2015-06-22 16:54                           ` Dan Williams
2015-06-22 16:54                           ` Dan Williams
2015-06-22 16:57                           ` Christoph Hellwig
2015-06-22 16:57                             ` Christoph Hellwig
2015-06-22 16:59                             ` Dan Williams
2015-06-22 16:59                               ` Dan Williams
2015-06-22 16:59                               ` Dan Williams
2015-06-23 19:30             ` Matthew Wilcox
2015-06-23 19:30               ` Matthew Wilcox
2015-06-24 12:11               ` Christoph Hellwig
2015-06-24 12:11                 ` Christoph Hellwig
2015-06-17 23:56 ` [PATCH 15/15] libnvdimm, nfit: handle acpi_nfit_memory_map flags Dan Williams
2015-06-17 23:56   ` 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=CAPcyv4hmYiU5Gzmz8prPCESOYGn099-TffFTZH0E2OAx+JzkTQ@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=axboe@kernel.dk \
    --cc=boaz@plexistor.com \
    --cc=hch@lst.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mingo@kernel.org \
    --cc=toshi.kani@hp.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 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.