Commit 488abc2b authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

bdev/aio: add sysctl hint when io_setup fails



Kernel has fs.aio-max-nr limit for maximum number
of AIO requests on the whole system.  It is possible
for SPDK to exceed this limit (default 64K) with
high core count applications and a lot of bdevs.
So provide ERRLOG hint to user when io_setup() fails,
to suggest increasing this limit.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I7ebebd20c23dbf2abb41fc8afc56ac11bcd3e699
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18232


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 6649e6ce
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -537,7 +537,8 @@ bdev_aio_create_cb(void *io_device, void *ctx_buf)
	struct bdev_aio_io_channel *ch = ctx_buf;

	if (io_setup(SPDK_AIO_QUEUE_DEPTH, &ch->io_ctx) < 0) {
		SPDK_ERRLOG("async I/O context setup failure\n");
		SPDK_ERRLOG("Async I/O context setup failure, likely due to exceeding kernel limit.\n");
		SPDK_ERRLOG("This limit may be increased using 'sysctl -w fs.aio-max-nr'.\n");
		return -1;
	}