Commit abc3bc4f authored by Ziye Yang's avatar Ziye Yang Committed by Jim Harris
Browse files

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: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/417442


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 893f26e8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@

static int bdev_rbd_count = 0;

#define BDEV_RBD_POLL_US 50

struct bdev_rbd {
	struct spdk_bdev disk;
	char *rbd_name;
@@ -512,7 +514,7 @@ bdev_rbd_create_cb(void *io_device, void *ctx_buf)
		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;