Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/bdev/bdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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());
}

/*
Expand Down Expand Up @@ -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
Expand Down
22 changes: 12 additions & 10 deletions lib/thread/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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++;

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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--;

Expand Down
10 changes: 8 additions & 2 deletions module/bdev/nvme/bdev_nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 *
Expand Down