Commit 686401eb authored by sunshihao520's avatar sunshihao520 Committed by Tomasz Zawadzki
Browse files

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: default avatarsunshihao <sunshihao@huawei.com>
Signed-off-by: default avatarsuweifeng <suweifeng1@huawei.com>
Change-Id: I43f8d51b08a01169d418e6a6a46266887f9a85dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4999


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarXiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 7dbe9cfa
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ _free_thread(struct spdk_thread *thread)

	TAILQ_FOREACH_SAFE(poller, &thread->active_pollers, tailq, ptmp) {
		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);
		}
		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) {
		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);
		}
		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) {
		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);
		free(poller);
	}