bdev: add API to get submit tsc of a bdev I/O
Add API spdk_bdev_io_get_submit_tsc to get submit tsc of a bdev I/O, which can be used in bdev modules to avoid calling expensive spdk_get_ticks(). Change-Id: Ifbcecb1bc663344997c5e73b72a1dfb5d0422946 Signed-off-by: Richael Zhuang <richael.zhuang@arm.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14989 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
c273513401
commit
cabbb25d5d
@ -25,6 +25,8 @@ required bdev.
|
|||||||
|
|
||||||
New `spdk_bdev_copy_blocks` and `spdk_bdev_get_max_copy` APIs to support copy commands.
|
New `spdk_bdev_copy_blocks` and `spdk_bdev_get_max_copy` APIs to support copy commands.
|
||||||
|
|
||||||
|
A new API `spdk_bdev_io_get_submit_tsc` was added to get the submit_tsc of the bdev I/O.
|
||||||
|
|
||||||
## v22.09
|
## v22.09
|
||||||
|
|
||||||
### accel
|
### accel
|
||||||
|
@ -1077,6 +1077,15 @@ struct spdk_thread *spdk_bdev_io_get_thread(struct spdk_bdev_io *bdev_io);
|
|||||||
*/
|
*/
|
||||||
struct spdk_io_channel *spdk_bdev_io_get_io_channel(struct spdk_bdev_io *bdev_io);
|
struct spdk_io_channel *spdk_bdev_io_get_io_channel(struct spdk_bdev_io *bdev_io);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the submit_tsc of a bdev I/O.
|
||||||
|
*
|
||||||
|
* \param bdev_io The bdev I/O to get the submit_tsc.
|
||||||
|
*
|
||||||
|
* \return The submit_tsc of the specified bdev I/O.
|
||||||
|
*/
|
||||||
|
uint64_t spdk_bdev_io_get_submit_tsc(struct spdk_bdev_io *bdev_io);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resize for a bdev.
|
* Resize for a bdev.
|
||||||
*
|
*
|
||||||
|
@ -3095,6 +3095,12 @@ spdk_bdev_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type io_ty
|
|||||||
return supported;
|
return supported;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
spdk_bdev_io_get_submit_tsc(struct spdk_bdev_io *bdev_io)
|
||||||
|
{
|
||||||
|
return bdev_io->internal.submit_tsc;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
spdk_bdev_dump_info_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w)
|
spdk_bdev_dump_info_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w)
|
||||||
{
|
{
|
||||||
|
@ -134,6 +134,7 @@
|
|||||||
spdk_bdev_io_complete_aio_status;
|
spdk_bdev_io_complete_aio_status;
|
||||||
spdk_bdev_io_get_thread;
|
spdk_bdev_io_get_thread;
|
||||||
spdk_bdev_io_get_io_channel;
|
spdk_bdev_io_get_io_channel;
|
||||||
|
spdk_bdev_io_get_submit_tsc;
|
||||||
spdk_bdev_notify_blockcnt_change;
|
spdk_bdev_notify_blockcnt_change;
|
||||||
spdk_scsi_nvme_translate;
|
spdk_scsi_nvme_translate;
|
||||||
spdk_bdev_module_list_add;
|
spdk_bdev_module_list_add;
|
||||||
|
Loading…
Reference in New Issue
Block a user