lib/nbd: return nbd_poll idle or busy accordingly
The previous version missed the case of return value of _nbd_poll equals to 0,and thus,when using nbd with no io,spdk_top shows high cpu utilization.Return idle when _nbd_poll return 0. Fixes #2697 Signed-off-by: Xinrui Mao <xinrui.mao@intel.com> Change-Id: Ifa2ca3010e10250b5320a8282dfed3d97bea5105 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14615 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
4c33c7ae20
commit
4a9209bf1d
@ -835,7 +835,7 @@ nbd_poll(void *arg)
|
||||
spdk_nbd_stop(nbd);
|
||||
}
|
||||
|
||||
return SPDK_POLLER_BUSY;
|
||||
return rc == 0 ? SPDK_POLLER_IDLE : SPDK_POLLER_BUSY;
|
||||
}
|
||||
|
||||
static void *
|
||||
|
Loading…
Reference in New Issue
Block a user