Conversation
a3aa301 to
b02ee38
Compare
|
Do you believe that multi-job verification is a sound test? Once requests are submitted to the device, they can be completed in an arbitrary order. For even a single job we can run into problems with repeated writes to the same offset completing in an order different from how they were submitted, leading to verification errors. For example see: |
|
@vincentkfu I would argue that if you have a single job that may issue concurrent overlapping writes and you want to verify the result then you should use |
Yes, I do. dedicated offsets for a job limits the variority of commands. If fio can manages overlapping offset ranges during command submission/completions, multi-job based data verification can test data integrity.
That's why this change plugs the incoming submissions if offsets are overlapped. So, only a single write command can enter to the device at a time.
|
Indeed, so this PR serialize all the overlapping incoming submissions to guarantee that only a single write command can enter to the device at a time. |
Background FIO has supported data verification integrity test based on per-job methodology. Each job should have its own dedicated offset area to make sure that other jobs do not corrupt the written offsets to keep the consistency based on the job point-of-view. NVMe spec supports various I/O commands causing written data pattern(e.g., zeroes) or status(e.g., unmap, uncor) updated. This means that these commands should be the candidates necessarily used for the data verification test. It leads to a demand for multiple jobs issuing various write-family commands to the same area and see the *latest* snapshot of written data pattern or status. This patch added a new option `--verify_table_id=<n>` to represent the verification table identifier for multiple jobs. If one or more jobs have the same value for this option, they will share the verification table, which is a lock-free concurrent skiplist to keep the `ipo`, i.e., io pieces. This patch does not change any functionalities for the previous dedicated area-based data verification if `--verify_table_id=` option is not given. The classical data verify methodology will keep as flist or rb-tree. This shared verify table also considers trimmed offset by setting `ipo->flags` with IP_F_TRIMMED and when the read phase starts, it will be treated as it was. Basically, fio verify job starts on the its own job context (thread or process) each. But, when the jobs are sharing the same verify table id, one of the jobs will win the race and only a single job will do the verify phase by atomic operation. Currently this patch only supports thread-based usages (--thread=1) for the simplicity. Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
As TRIM does, some I/O requests can cause written data pattern(e.g., zeroed) or status updated(uncor). This patch, for example, added support for IO_U_F_TRIMMED, IO_U_F_ZEROED, and IO_U_F_ERRORED for NVMe commands to io_uring ioengine. Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
For example, in io_uring_cmd with nvme cmd_type, trimmed offset might return NVMe status code to represent the given offsets are unmapped. In this case, failure might be expected. This patch added a new option just like the other trim_verify_* series to maskd the expected error value from the ioengine. Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
b02ee38 to
c916ef8
Compare
See the first commit description for the background and details.
The following jobfile is an example for the multiple write job based data verification.
16 jobs are going to write[zeroes, uncor, trim] to the same area [0, 1M).
After run this jobfile, we can see the READ(verify) phase were issued only just for 1MB(256 commands):