diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c index 73c7a2792c8..01ad13a8d9c 100644 --- a/lib/bdev/bdev.c +++ b/lib/bdev/bdev.c @@ -4520,7 +4520,8 @@ bdev_channel_create(void *io_device, void *ctx_buf) bdev_update_all_descriptors(bdev); spdk_spin_unlock(&bdev->internal.spinlock); - + SPDK_NOTICELOG("Created bdev %s IO channel %p, core %u\n", + bdev->name, ch, spdk_env_get_current_core()); return 0; } @@ -4916,6 +4917,8 @@ bdev_channel_destroy(void *io_device, void *ctx_buf) } bdev_channel_destroy_resource(ch); + SPDK_NOTICELOG("Destroyed bdev %s IO channel %p, core %u\n", + ch->bdev->name, ch, spdk_env_get_current_core()); } /* @@ -5037,7 +5040,10 @@ spdk_bdev_alias_del_all(struct spdk_bdev *bdev) struct spdk_io_channel * spdk_bdev_get_io_channel(struct spdk_bdev_desc *desc) { - return spdk_get_io_channel(__bdev_to_io_dev(spdk_bdev_desc_get_bdev(desc))); + struct spdk_io_channel *ch = spdk_get_io_channel(__bdev_to_io_dev(spdk_bdev_desc_get_bdev(desc))); + SPDK_NOTICELOG("Bdev %s get IO channel %p, core %u\n", + desc->bdev->name, ch, spdk_env_get_current_core()); + return ch; } uint32_t diff --git a/lib/thread/thread.c b/lib/thread/thread.c index 5e44ef9ecbe..4546ec1e0b1 100644 --- a/lib/thread/thread.c +++ b/lib/thread/thread.c @@ -2362,8 +2362,9 @@ spdk_get_io_channel(void *io_device) if (ch != NULL) { ch->ref++; - SPDK_DEBUGLOG(thread, "Get io_channel %p for io_device %s (%p) on thread %s refcnt %u\n", - ch, dev->name, dev->io_device, thread->name, ch->ref); + SPDK_NOTICELOG("Get io_channel %p for io_device %s (%p) on thread %s (core %u) refcnt %u\n", + ch, dev->name, dev->io_device, thread->name, + spdk_env_get_current_core(), ch->ref); /* * An I/O channel already exists for this device on this @@ -2389,8 +2390,9 @@ spdk_get_io_channel(void *io_device) ch->destroy_ref = 0; RB_INSERT(io_channel_tree, &thread->io_channels, ch); - SPDK_DEBUGLOG(thread, "Get io_channel %p for io_device %s (%p) on thread %s refcnt %u\n", - ch, dev->name, dev->io_device, thread->name, ch->ref); + SPDK_NOTICELOG("Get io_channel %p for io_device %s (%p) on thread %s (core %u) refcnt %u\n", + ch, dev->name, dev->io_device, thread->name, + spdk_env_get_current_core(), ch->ref); dev->refcnt++; @@ -2426,9 +2428,9 @@ put_io_channel(void *arg) return; } - SPDK_DEBUGLOG(thread, - "Releasing io_channel %p for io_device %s (%p) on thread %s\n", - ch, ch->dev->name, ch->dev->io_device, thread->name); + SPDK_NOTICELOG("Releasing io_channel %p for io_device %s (%p) on thread %s (core %u) refcnt %u, destroy refcnt %u\n", + ch, ch->dev->name, ch->dev->io_device, thread->name, + spdk_env_get_current_core(), ch->ref, ch->destroy_ref); assert(ch->thread == thread); @@ -2490,9 +2492,9 @@ spdk_put_io_channel(struct spdk_io_channel *ch) return; } - SPDK_DEBUGLOG(thread, - "Putting io_channel %p for io_device %s (%p) on thread %s refcnt %u\n", - ch, ch->dev->name, ch->dev->io_device, thread->name, ch->ref); + SPDK_NOTICELOG("Putting io_channel %p for io_device %s (%p) on thread %s (core %u) refcnt %u\n", + ch, ch->dev->name, ch->dev->io_device, thread->name, + spdk_env_get_current_core(), ch->ref); ch->ref--; diff --git a/module/bdev/nvme/bdev_nvme.c b/module/bdev/nvme/bdev_nvme.c index 514544c2a72..c06ba14d55e 100644 --- a/module/bdev/nvme/bdev_nvme.c +++ b/module/bdev/nvme/bdev_nvme.c @@ -1019,6 +1019,8 @@ bdev_nvme_create_bdev_channel_cb(void *io_device, void *ctx_buf) } pthread_mutex_unlock(&nbdev->mutex); + SPDK_NOTICELOG("Created bdev nvme %s IO channel %p, core %u\n", + nbdev->disk.name, nbdev_ch, spdk_env_get_current_core()); return 0; } @@ -1047,6 +1049,8 @@ bdev_nvme_destroy_bdev_channel_cb(void *io_device, void *ctx_buf) bdev_nvme_abort_retry_ios(nbdev_ch); _bdev_nvme_delete_io_paths(nbdev_ch); + SPDK_NOTICELOG("Destroyed bdev nvme IO channel %p, core %u\n", + nbdev_ch, spdk_env_get_current_core()); } static inline bool @@ -4153,8 +4157,10 @@ static struct spdk_io_channel * bdev_nvme_get_io_channel(void *ctx) { struct nvme_bdev *nvme_bdev = ctx; - - return spdk_get_io_channel(nvme_bdev); + struct spdk_io_channel *ch = spdk_get_io_channel(nvme_bdev); + SPDK_NOTICELOG("Bdev_nvme %s get IO channel %p, core %u\n", + nvme_bdev->disk.name, ch, spdk_env_get_current_core()); + return ch; } static void *