In current implementation, io_channel list will be accessed by spdk_for_each_channel() and spdk_get_io_channel(). We will try to accelerate spdk_get_io_channel() in the following change "thread: speed up io_channel lookup by using rbtree" by changing io_channel from list into RB tree. To make it cleaner, we prefer to use ch->dev as the key for the io_channel RB tree instead of ch->dev->io_device. This patch makes spdk_for_each_channel() use the i->dev to find the expected io_channel. And the io_device in structure spdk_io_channel_iter is not needed in spdk_for_each_channel_continue() but we keep it for the compatibility of spdk_io_channel_iter_get_io_device(). After this patch, spdk_for_each_channel() has to access both io_device list and io_channel list, and spdk_for_each_channel_continue() still has to access only io_channel list. Both io_device list and io_channel list will become RB tree. Hence performance degradation will be negligible. spdk_for_each_channel() is not so performance critical than spdk_get_io_channel(). Signed-off-by: Jiewei Ke <jiewei@smartx.com> Change-Id: Idd486b0aa1b63b57ede90527dcd1631cbb008a1a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8749 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
Makefile | ||
spdk_thread.map | ||
thread_internal.h | ||
thread.c |