Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1168245
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/15] block: introduce an ->rw_bytes() block device operation |
| Date | 2015-06-18 21:30 +0200 |
| Message-ID | <pCNFF-10E-25@gated-at.bofh.it> (permalink) |
| References | <pCvpn-8ib-9@gated-at.bofh.it> <pCvpp-8ib-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jun 17, 2015 at 4:54 PM, Dan Williams <dan.j.williams@intel.com> wrote: > Why do we need a new method in block_device_operations? > > The capacities of persistent memory make it too large to map as RAM (no > struct page coverage by default), so Linux arranges for it to be managed > as a block device. The bio interface to a block device enforces sector > at a time i/o and has infrastructure for asynchronous completion of i/o. > The ->rw_page() interface is closely tied to the page cache and also > carries asynchronous i/o completion assumptions. NVDIMM devices are > fast enough to complete i/o's synchronously (memcpy) and some in kernel > applications can take advantage of the byte-aligned (as opposed to > sector-aligned) nature of the media. The ->rw_bytes() operation is > added to fill this role that does not fit into any existing access > method. > > It could be argued that a ->rw_bytes() method makes a struct > block_device not a *block* device. However, the applications for > persistent memory as storage devices makes them more "block" devices > than "character" devices. > > The first consumer of the ->rw_bytes() capability is a stacked > block_device driver (BTT - block translation table) that adds atomic > sector update semantics on top of an nvdimm storage device. > > Why enable drivers like BTT on top of a new globally visibly > block_device_operations op rather than an internal detail of nvdimm > drivers? > > 1/ We want ->rw_bytes() consumers to be enabled on either a per-disk or > per-partition basis. Consider the case of enabling DAX+XFS on a single > persistent memory disk whereby the metadata needs atomic sector update > guarantees, but the data would like to be DAX capable. Solution is to > create two partitions and enable BTT on the "metadata/XFS-logdev" > partition. > > 2/ We want this configuration topology to be visible to the sysfs device > model, and not an internal detail of nvdimm drivers requiring special > tooling. For example if you ever wanted to "fsck" BTT metadata that > could be carried out on the raw nvdimm device directly rather than > require custom tooling / mechanisms to access the raw media. > > 3/ It becomes trivial to add new BTT like drivers without touching the > nvdimm drivers to add is_btt_mode(), is_foo_mode(), etc... checks in the > fast path. > Acked-by: Jens Axboe <axboe@fb.com> ...off list. Christoph, I assume that satisfies your primary concern with the BTT infrastructure and implementation? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/15] libnvdimm: ->rw_bytes(), BLK-mode, unit tests, and misc features Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
[PATCH 12/15] libnvdimm: enable iostat Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
Re: [PATCH 12/15] libnvdimm: enable iostat Christoph Hellwig <hch@lst.de> - 2015-06-19 10:40 +0200
Re: [PATCH 12/15] libnvdimm: enable iostat Dan Williams <dan.j.williams@intel.com> - 2015-06-19 11:10 +0200
Re: [PATCH 12/15] libnvdimm: enable iostat Christoph Hellwig <hch@lst.de> - 2015-06-21 12:20 +0200
[PATCH 07/15] fs/block_dev.c: skip rw_page if bdev has integrity Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
[PATCH 13/15] libnvdimm: flag libnvdimm block devices as non-rotational Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
[PATCH 01/15] block: introduce an ->rw_bytes() block device operation Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
Re: [PATCH 01/15] block: introduce an ->rw_bytes() block device operation Dan Williams <dan.j.williams@intel.com> - 2015-06-18 21:30 +0200
[PATCH 09/15] libnvdimm, blk: add support for blk integrity Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
[PATCH 15/15] libnvdimm, nfit: handle acpi_nfit_memory_map flags Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:00 +0200
[PATCH 11/15] libnvdimm: pmem, blk, and btt make_request cleanups Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:10 +0200
Re: [PATCH 11/15] libnvdimm: pmem, blk, and btt make_request cleanups Christoph Hellwig <hch@lst.de> - 2015-06-21 12:20 +0200
[PATCH 08/15] libnvdimm, btt: add support for blk integrity Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:10 +0200
[PATCH 02/15] libnvdimm: infrastructure for btt devices Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:10 +0200
[PATCH 10/15] libnvdimm: fix up max_hw_sectors Dan Williams <dan.j.williams@intel.com> - 2015-06-18 02:10 +0200
Re: [PATCH 10/15] libnvdimm: fix up max_hw_sectors Christoph Hellwig <hch@lst.de> - 2015-06-21 12:10 +0200
Re: [PATCH 03/15] nd_btt: atomic sector updates Christoph Hellwig <hch@lst.de> - 2015-06-21 12:10 +0200
Re: [PATCH 03/15] nd_btt: atomic sector updates Dan Williams <dan.j.williams@intel.com> - 2015-06-21 18:40 +0200
Re: [PATCH 04/15] libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory Christoph Hellwig <hch@lst.de> - 2015-06-21 12:10 +0200
Re: [PATCH 04/15] libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory Dan Williams <dan.j.williams@intel.com> - 2015-06-21 16:50 +0200
csiph-web