bdevperf: Limit queue depth for verify job with big IO
By design verify payload, uses a bit array to find an offset of IO request. The bit array's size is calculated as bdev_num_blocks / (io_size/block_size), if bdev is small, queue depth requested by the user might be bigger than the bit array size and in that case bdevperf won't find a free bit for IO request offset. To fix that issue, limit queue_depth of such bdevs by "size_in_ios" value Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com> Change-Id: I3117f5af7ae3ea18219c25982f33db936dd24c0b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15777 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
893aaacccb
commit
e58885f949
@ -1651,6 +1651,13 @@ bdevperf_construct_job(struct spdk_bdev *bdev, struct job_config *config,
|
||||
bdevperf_job_free(job);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (job->queue_depth > (int)job->size_in_ios) {
|
||||
SPDK_WARNLOG("Due to constraints of verify job, queue depth (-q, %d) can't exceed the number of IO "
|
||||
"requests which can be submitted to the bdev %s simultaneously (%"PRIu64"). "
|
||||
"Queue depth is limited to %"PRIu64"\n",
|
||||
job->queue_depth, job->name, job->size_in_ios, job->size_in_ios);
|
||||
job->queue_depth = (int)job->size_in_ios;
|
||||
}
|
||||
}
|
||||
|
||||
job->histogram = spdk_histogram_data_alloc();
|
||||
|
Loading…
Reference in New Issue
Block a user