Recent changes (master)
The following changes since commit 6e039133f1fe30b1abf742423019836c4d1e8123:
docs: fix operations misspellings (2024-06-04 08:53:07 -0400)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to eb7fe4550ff2a569d0d8c71de16a1ea1e1aaf0a5:
Revert "smalloc: smalloc() already clears memory, scalloc() need not do it again" (2024-06-06 14:03:47 -0400)
----------------------------------------------------------------
Vincent Fu (5):
options: support ranges for FDP plids option
t/nvmept_fdp: add tests for plid ranges
docs: update and clarify plids option
dataplacement: increase max data placement IDs to 128
Revert "smalloc: smalloc() already clears memory, scalloc() need not do it again"
HOWTO.rst | 17 +++-- cconv.c | 4 +- dataplacement.h | 2 +- fio.1 | 17 +++-- options.c | 53 +++++++++++++--- server.h | 2 +- smalloc.c | 8 ++- t/nvmept_fdp.py | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- thread_options.h | 4 +- 9 files changed, 266 insertions(+), 31 deletions(-)
---
Diff of recent changes:
HOWTO.rst +11 -6
@@ -2538,12 +2538,17 @@ with the caveat that when used on the command line, they must come after the .. option:: plids=str, fdp_pli=str : [io_uring_cmd] [xnvme] - Select which Placement IDs (streams) or Placement ID Indices (FDP) this - job is allowed to use for writes. For FDP by default, the job will - cycle through all available Placement IDs, so use this to isolate these - identifiers to specific jobs. If you want fio to use FDP placement - identifiers only at indices 0, 2 and 5 specify ``plids=0,2,5``. For - streams this should be a comma-separated list of Stream IDs. + Select which Placement ID Indices (FDP) or Placement IDs (streams) this + job is allowed to use for writes. This option accepts a comma-separated + list of values or ranges (e.g., 1,2-4,5,6-8). + + For FDP by default, the job will cycle through all available Placement + IDs, so use this option to be selective. The values specified here are + array indices for the list of placement IDs returned by the nvme-cli + command ``nvme fdp status``. If you want fio to use FDP placement + identifiers only at indices 0, 2 and 5, set ``plids=0,2,5``. + + For streams this should be a list of Stream IDs. .. option:: dp_scheme=str : [io_uring_cmd] [xnvme]
cconv.c +2 -2
@@ -359,7 +359,7 @@ int convert_thread_options_to_cpu(struct thread_options *o, o->dp_id_select =le32_to_cpu (top->dp_id_select); o->dp_nr_ids =le32_to_cpu (top->dp_nr_ids);for (i =0 ; i < o->dp_nr_ids; i++) - o->dp_ids[i] =le32_to_cpu (top->dp_ids[i]); + o->dp_ids[i] =le16_to_cpu (top->dp_ids[i]);#if 0 uint8_t cpumask[FIO_TOP_STR_MAX ];uint8_t verify_cpumask[FIO_TOP_STR_MAX ];
@@ -659,7 +659,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top, top->dp_id_select =cpu_to_le32 (o->dp_id_select); top->dp_nr_ids =cpu_to_le32 (o->dp_nr_ids);for (i =0 ; i < o->dp_nr_ids; i++) - top->dp_ids[i] =cpu_to_le32 (o->dp_ids[i]); + top->dp_ids[i] =cpu_to_le16 (o->dp_ids[i]);#if 0 uint8_t cpumask[FIO_TOP_STR_MAX ];uint8_t verify_cpumask[FIO_TOP_STR_MAX ];
dataplacement.h +1 -1
@@ -6,7 +6,7 @@#define STREAMS_DIR_DTYPE 1#define FDP_DIR_DTYPE 2#define FDP_MAX_RUHS 128 -#define FIO_MAX_DP_IDS 16 +#define FIO_MAX_DP_IDS 128#define DP_MAX_SCHEME_ENTRIES 32/*
fio.1 +11 -6
@@ -2305,12 +2305,17 @@ The available placement ID (indices) are defined by \fBplids\fR or .RE .TP .BI (io_uring_cmd,xnvme)plids=str, fdp_pli \fR=\fPstr -Select which Placement IDs (streams) or Placement ID Indicies (FDP) this job is -allowed to use for writes. For FDP by default, the job will cycle through all -available Placement IDs, so use this to isolate these identifiers to specific -jobs. If you want fio to use placement identifier only at indices 0, 2 and 5 -specify, you would set `plids=0,2,5`. For streams this should be a -comma-separated list of Stream IDs. +Select which Placement ID Indices (FDP) or Placement IDs (streams) this job is +allowed to use for writes. This option accepts a comma-separated list of values +or ranges (e.g., 1,2-4,5,6-8). + +For FDP by default, the job will cycle through all available Placement IDs, so +use this option to be selective. The values specified here are array indices +for the list of placement IDs returned by the nvme-cli command `nvme fdp +status'. If you want fio to use FDP placement identifiers only at indices 0, 2 +and 5, set `plids=0,2,5'. + +For streams this should be a list of Stream IDs. .TP .BI (io_uring_cmd,xnvme)\fR\fBdp_scheme\fP=str Defines which placement ID (index) to be selected based on offset(LBA) range.
options.c +43 -10
71 lines not on this page · raw message
server.h +1 -1
@@ -51,7 +51,7 @@ struct fio_net_cmd_reply { };enum { -FIO_SERVER_VER =105 , +FIO_SERVER_VER =106 ,FIO_SERVER_MAX_FRAGMENT_PDU =1024 ,FIO_SERVER_MAX_CMD_MB =2048 ,
smalloc.c +7 -1
@@ -566,7 +566,13 @@ void *smalloc(size_t size)void *scalloc (size_t nmemb,size_t size) { -return smalloc (nmemb * size); +void *ret; + + ret =smalloc (nmemb * size); +if (ret) +memset (ret,0 , nmemb * size); + +return ret; }char *smalloc_strdup (const char *str)
t/nvmept_fdp.py +188 -2
221 lines not on this page · raw message
thread_options.h +2 -2
@@ -394,7 +394,7 @@ struct thread_options {unsigned int fdp;unsigned int dp_type;unsigned int dp_id_select; -unsigned int dp_ids[FIO_MAX_DP_IDS ]; +uint16_t dp_ids[FIO_MAX_DP_IDS ];unsigned int dp_nr_ids;char *dp_scheme_file;
@@ -712,7 +712,7 @@ struct thread_options_pack {uint32_t fdp;uint32_t dp_type;uint32_t dp_id_select; -uint32_t dp_ids[FIO_MAX_DP_IDS ]; +uint16_t dp_ids[FIO_MAX_DP_IDS ];uint32_t dp_nr_ids;uint8_t dp_scheme_file[FIO_TOP_STR_MAX ];