lib/thead: add information when poller isn't free

When call _free_thread in the exit process, print poller type information to identify which type poller is not free.
Even if the fuction spdk_poller_register_named called, we don't konw what type the poller is.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: I43f8d51b08a01169d418e6a6a46266887f9a85dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4999
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
sunshihao520 2020-11-03 16:21:04 +08:00 committed by Tomasz Zawadzki
parent 7dbe9cfa0f
commit 686401ebf2

View File

@ -201,7 +201,7 @@ _free_thread(struct spdk_thread *thread)
TAILQ_FOREACH_SAFE(poller, &thread->active_pollers, tailq, ptmp) { TAILQ_FOREACH_SAFE(poller, &thread->active_pollers, tailq, ptmp) {
if (poller->state != SPDK_POLLER_STATE_UNREGISTERED) { if (poller->state != SPDK_POLLER_STATE_UNREGISTERED) {
SPDK_WARNLOG("poller %s still registered at thread exit\n", SPDK_WARNLOG("active_poller %s still registered at thread exit\n",
poller->name); poller->name);
} }
TAILQ_REMOVE(&thread->active_pollers, poller, tailq); TAILQ_REMOVE(&thread->active_pollers, poller, tailq);
@ -210,7 +210,7 @@ _free_thread(struct spdk_thread *thread)
TAILQ_FOREACH_SAFE(poller, &thread->timed_pollers, tailq, ptmp) { TAILQ_FOREACH_SAFE(poller, &thread->timed_pollers, tailq, ptmp) {
if (poller->state != SPDK_POLLER_STATE_UNREGISTERED) { if (poller->state != SPDK_POLLER_STATE_UNREGISTERED) {
SPDK_WARNLOG("poller %s still registered at thread exit\n", SPDK_WARNLOG("timed_poller %s still registered at thread exit\n",
poller->name); poller->name);
} }
TAILQ_REMOVE(&thread->timed_pollers, poller, tailq); TAILQ_REMOVE(&thread->timed_pollers, poller, tailq);
@ -218,7 +218,7 @@ _free_thread(struct spdk_thread *thread)
} }
TAILQ_FOREACH_SAFE(poller, &thread->paused_pollers, tailq, ptmp) { TAILQ_FOREACH_SAFE(poller, &thread->paused_pollers, tailq, ptmp) {
SPDK_WARNLOG("poller %s still registered at thread exit\n", poller->name); SPDK_WARNLOG("paused_poller %s still registered at thread exit\n", poller->name);
TAILQ_REMOVE(&thread->paused_pollers, poller, tailq); TAILQ_REMOVE(&thread->paused_pollers, poller, tailq);
free(poller); free(poller);
} }