bdev/rbd: change the poller to timer poller
Poll it every 50 microseconds. Reason: Ceph's librbd service is not very fast. So choose a timer period to poll it, instead of use the syscall to poll it again and again, it is unnecessary. And this is a default value, which can be tuned by customers later. Change-Id: I91c31442da5ddadf3bef43083bd789d01bb1c952 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/417442 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
893f26e84b
commit
abc3bc4f8e
@ -54,6 +54,8 @@
|
|||||||
|
|
||||||
static int bdev_rbd_count = 0;
|
static int bdev_rbd_count = 0;
|
||||||
|
|
||||||
|
#define BDEV_RBD_POLL_US 50
|
||||||
|
|
||||||
struct bdev_rbd {
|
struct bdev_rbd {
|
||||||
struct spdk_bdev disk;
|
struct spdk_bdev disk;
|
||||||
char *rbd_name;
|
char *rbd_name;
|
||||||
@ -512,7 +514,7 @@ bdev_rbd_create_cb(void *io_device, void *ctx_buf)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
ch->poller = spdk_poller_register(bdev_rbd_io_poll, ch, 0);
|
ch->poller = spdk_poller_register(bdev_rbd_io_poll, ch, BDEV_RBD_POLL_US);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user