fio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ankit Kumar <ankit.kumar@samsung.com>
To: axboe@kernel.dk, vincentfu@gmail.com
Cc: fio@vger.kernel.org, joshi.k@samsung.com,
	Ankit Kumar <ankit.kumar@samsung.com>
Subject: [PATCH 0/3] Support trim with multiple ranges
Date: Wed, 14 Feb 2024 17:36:21 +0530	[thread overview]
Message-ID: <20240214120624.135416-1-ankit.kumar@samsung.com> (raw)
In-Reply-To: CGME20240214064924epcas5p12bee438c7815ca28e43a536459bcddc2@epcas5p1.samsung.com

NVMe specification allow multiple ranges for the dataset management
command. The block ioctl only accepts a single entry for trim, but
with nvme character device we can send multiple ranges.

The first patch in this series adds an option num_range to send multiple
range per trim request. This will only work if the data direction is
solely trim i.e. trim or randtrim.

The next two patches in this series updates io_uring_cmd ioengine with
the required changes.

Note: The first patch which changes the io_u request for multiple ranges
can be used in future for NVMe copy command which copies multiple source
range entries to single destination.

Ankit Kumar (3):
  trim: add support for multiple ranges
  engines/nvme: pass offset and len instead of io_u
  engines/io_uring: add multi range dsm support

 HOWTO.rst                               |   7 ++
 backend.c                               |  20 +++++-
 cconv.c                                 |   2 +
 engines/io_uring.c                      |  34 ++++++++--
 engines/nvme.c                          |  68 ++++++++++++--------
 engines/nvme.h                          |   7 +-
 examples/uring-cmd-trim-multi-range.fio |  21 ++++++
 examples/uring-cmd-trim-multi-range.png | Bin 0 -> 61922 bytes
 fio.1                                   |   6 ++
 fio.h                                   |  18 ++++++
 init.c                                  |  13 ++++
 io_u.c                                  |  81 +++++++++++++++++++-----
 io_u.h                                  |   4 ++
 ioengines.h                             |   2 +
 options.c                               |  11 ++++
 thread_options.h                        |   3 +
 16 files changed, 244 insertions(+), 53 deletions(-)
 create mode 100644 examples/uring-cmd-trim-multi-range.fio
 create mode 100644 examples/uring-cmd-trim-multi-range.png

-- 
2.25.1


       reply	other threads:[~2024-02-14  6:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240214064924epcas5p12bee438c7815ca28e43a536459bcddc2@epcas5p1.samsung.com>
2024-02-14 12:06 ` Ankit Kumar [this message]
     [not found]   ` <CGME20240214064925epcas5p4167aa60ecee87f3a15bb2a57a4409685@epcas5p4.samsung.com>
2024-02-14 12:06     ` [PATCH 1/3] trim: add support for multiple ranges Ankit Kumar
2024-02-14 14:43       ` Jens Axboe
2024-02-14 17:51       ` Vincent Fu
     [not found]   ` <CGME20240214064926epcas5p29dcccdd0abe0e0ffb75c64835ec6a01a@epcas5p2.samsung.com>
2024-02-14 12:06     ` [PATCH 2/3] engines/nvme: pass offset and len instead of io_u Ankit Kumar
2024-02-14 14:44       ` Jens Axboe
     [not found]   ` <CGME20240214064927epcas5p468b8554a7555bb666a0147df11db9d28@epcas5p4.samsung.com>
2024-02-14 12:06     ` [PATCH 3/3] engines/io_uring: add multi range dsm support Ankit Kumar
2024-02-14 14:45       ` Jens Axboe

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=20240214120624.135416-1-ankit.kumar@samsung.com \
    --to=ankit.kumar@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=joshi.k@samsung.com \
    --cc=vincentfu@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).