public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@fb.com>
To: <linux-fsdevel@vger.kernel.org>, <linux-block@vger.kernel.org>,
	<linux-nvme@lists.infradead.org>
Cc: <axboe@kernel.dk>, Kernel Team <Kernel-team@fb.com>, <hch@lst.de>,
	<willy@infradead.org>, <sagi@grimberg.me>,
	Keith Busch <kbusch@kernel.org>
Subject: [PATCH 00/12] block: support for partial sector reads
Date: Thu, 30 Jun 2022 13:42:00 -0700	[thread overview]
Message-ID: <20220630204212.1265638-1-kbusch@fb.com> (raw)

From: Keith Busch <kbusch@kernel.org>

At LSFMM nearly 2 months ago, I discussed how some storage hardware
supports the ability to read at granularities smaller than a sector, and
the nvme protocol feature that enables this capability, "bit buckets".
This is useful in scenarios where only parts of sectors are used by the
application, and the primary benefits to support this are:

  * Improved link bandwidth usage
  * Reduced memory utilization

This series enables the block layer and nvme to set up bit bucket
descriptors for read commands, then enables user space direct-io to make
use of this capability by allowing the user to specify an arbitrary
offset and length. This allows truncating an arbitrary number of bytes
off sectors from the front and end of the transfer.  

There are no current in-kernel users beyond the direct-io cases, but
this could also be used for to truncate bytes out of the middle of a
transfer as well. For example, if you wanted to read a page and knew you
wer going to immediately dirty some number of bytes in the middle, you
could set up a read request to skip those in the data transfer.

Keith Busch (12):
  block: move direct io alignment check to common
  iomap: save copy of bdev for direct io
  iomap: get logical block size directly
  iomap: use common blkdev alignment check
  block: add bit bucket capabilities
  nvme: add support for bit buckets
  block: allow copying pre-registered bvecs
  block: add bio number of vecs helper for partials
  block: add partial sector parameter helper
  block: add direct-io partial sector read support
  iomap: add direct io partial sector read support
  block: export and document bit_bucket attribute

 Documentation/ABI/stable/sysfs-block |  9 +++
 block/bio.c                          | 42 +++++++++++-
 block/blk-core.c                     |  5 ++
 block/blk-merge.c                    |  3 +-
 block/blk-mq.c                       |  2 +
 block/blk-sysfs.c                    |  3 +
 block/fops.c                         | 97 ++++++++++++++++++----------
 drivers/nvme/host/core.c             |  3 +
 drivers/nvme/host/nvme.h             |  6 ++
 drivers/nvme/host/pci.c              | 17 ++++-
 fs/iomap/direct-io.c                 | 43 ++++++++----
 include/linux/bio.h                  | 11 ++++
 include/linux/blk-mq.h               |  2 +
 include/linux/blk_types.h            |  1 +
 include/linux/blkdev.h               | 41 ++++++++++++
 include/linux/nvme.h                 |  2 +
 16 files changed, 236 insertions(+), 51 deletions(-)

-- 
2.30.2



             reply	other threads:[~2022-06-30 20:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 20:42 Keith Busch [this message]
2022-06-30 20:42 ` [PATCH 01/12] block: move direct io alignment check to common Keith Busch
2022-06-30 20:42 ` [PATCH 02/12] iomap: save copy of bdev for direct io Keith Busch
2022-06-30 20:42 ` [PATCH 03/12] iomap: get logical block size directly Keith Busch
2022-06-30 20:42 ` [PATCH 04/12] iomap: use common blkdev alignment check Keith Busch
2022-06-30 20:42 ` [PATCH 05/12] block: add bit bucket capabilities Keith Busch
2022-06-30 20:42 ` [PATCH 06/12] nvme: add support for bit buckets Keith Busch
2022-06-30 20:42 ` [PATCH 07/12] block: allow copying pre-registered bvecs Keith Busch
2022-07-01  2:40   ` Keith Busch
2022-06-30 20:42 ` [PATCH 08/12] block: add bio number of vecs helper for partials Keith Busch
2022-06-30 20:42 ` [PATCH 09/12] block: add partial sector parameter helper Keith Busch
2022-06-30 20:42 ` [PATCH 10/12] block: add direct-io partial sector read support Keith Busch
2022-06-30 20:42 ` [PATCH 11/12] iomap: " Keith Busch
2022-06-30 20:42 ` [PATCH 12/12] block: export and document bit_bucket attribute Keith Busch

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=20220630204212.1265638-1-kbusch@fb.com \
    --to=kbusch@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=willy@infradead.org \
    /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