Commit 10c72665 authored by John Levon's avatar John Levon Committed by Konrad Sztyber
Browse files

iobuf: add more detail to cache allocation failures



Name the consuming component and indicate exactly where we exhausted the
pool.

Signed-off-by: default avatarJohn Levon <john.levon@nutanix.com>
Change-Id: Id7fc6ffae35fea4fe4f30e45faefce126f8ed644
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22080


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 3a45c848
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -308,9 +308,9 @@ spdk_iobuf_channel_init(struct spdk_iobuf_channel *ch, const char *name,

	for (i = 0; i < small_cache_size; ++i) {
		if (spdk_ring_dequeue(g_iobuf.small_pool, (void **)&buf, 1) == 0) {
			SPDK_ERRLOG("Failed to populate iobuf small buffer cache. "
			SPDK_ERRLOG("Failed to populate '%s' iobuf small buffer cache at %d/%d entries. "
				    "You may need to increase spdk_iobuf_opts.small_pool_count (%"PRIu64")\n",
				    g_iobuf.opts.small_pool_count);
				    name, i, small_cache_size, g_iobuf.opts.small_pool_count);
			SPDK_ERRLOG("See scripts/calc-iobuf.py for guidance on how to calculate "
				    "this value.\n");
			goto error;
@@ -320,9 +320,9 @@ spdk_iobuf_channel_init(struct spdk_iobuf_channel *ch, const char *name,
	}
	for (i = 0; i < large_cache_size; ++i) {
		if (spdk_ring_dequeue(g_iobuf.large_pool, (void **)&buf, 1) == 0) {
			SPDK_ERRLOG("Failed to populate iobuf large buffer cache. "
			SPDK_ERRLOG("Failed to populate '%s' iobuf large buffer cache at %d/%d entries. "
				    "You may need to increase spdk_iobuf_opts.large_pool_count (%"PRIu64")\n",
				    g_iobuf.opts.large_pool_count);
				    name, i, large_cache_size, g_iobuf.opts.large_pool_count);
			SPDK_ERRLOG("See scripts/calc-iobuf.py for guidance on how to calculate "
				    "this value.\n");
			goto error;