Re: [PATCHv2] fio: add fdp support for io_uring_cmd nvme engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/23 12:12, Keith Busch wrote:
From: Keith Busch <kbusch@xxxxxxxxxx>

Add support for NVMe TP4146 Flexible Data Placemen, allowing placement
identifiers in write commands. The user can enabled this with the new
"fdp=1" parameter for fio's io_uring_cmd ioengine. By default, the fio
jobs will cycle through all the namespace's available placement
identifiers for write commands. The user can limit which placement
identifiers can be used with additional parameter, "fdp_plis=<list,>",
which can be used to separate write intensive jobs from less intensive
ones.

Setting up your namespace for FDP is outside the scope of 'fio', so this
assumes the namespace is already properly configured for the mode.

Based-on-a-patch-by: Ankit Kumar <ankit.kumar@xxxxxxxxxxx>
Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
---

<snip>

diff --git a/engines/io_uring.c b/engines/io_uring.c
index a9abd11d..4d1ee021 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -1262,6 +1262,28 @@ static int fio_ioring_cmd_get_max_open_zones(struct thread_data *td,
  	return fio_nvme_get_max_open_zones(td, f, max_open_zones);
  }
+static int fio_ioring_cmd_fetch_ruhs(struct thread_data *td, struct fio_file *f,
+				     struct fio_ruhs_info *fruhs_info)
+{
+	struct nvme_fdp_ruh_status *ruhs;
+	int bytes, ret, i;
+
+	bytes = sizeof(*ruhs) + 1024 * sizeof(struct nvme_fdp_ruh_status_desc);
+	ruhs = malloc(bytes);
+	memset(ruhs, 0, bytes);

calloc?

<snip>

diff --git a/thread_options.h b/thread_options.h
index 74e7ea45..605eb259 100644
--- a/thread_options.h
+++ b/thread_options.h
@@ -386,6 +386,11 @@ struct thread_options {
  	fio_fp64_t zrt;
  	fio_fp64_t zrf;
+#define FIO_MAX_PLIS 16
+	unsigned int fdp;
+	unsigned int fdp_plis[FIO_MAX_PLIS];
+	unsigned int fdp_nrpli;
+
  	unsigned int log_entries;
  	unsigned int log_prio;
  };
@@ -698,6 +703,8 @@ struct thread_options_pack {
  	uint32_t log_entries;
  	uint32_t log_prio;
+ uint32_t fdp;
+
  	/*
  	 * verify_pattern followed by buffer_pattern from the unpacked struct
  	 */

struct thread_options_pack also needs fdp_plis[] and fdp_nrpli members. In addition to the cconv.c changes that Ankit mentioned FIO_SERVER_VER should also be bumped so that these options can be properly transmitted when fio is run in client/server mode.

Vincent



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux