Skip to content

Commit 20b3fe6

Browse files
committed
* 'master' of https://github.com/andrew-sayers/liburing: Explain -ENOMEM return value from io_uring_queue_init()
2 parents 18c4159 + f692734 commit 20b3fe6

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

man/io_uring_queue_exit.3

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ io_uring_queue_exit \- tear down io_uring submission and completion queues
1818
will release all resources acquired and initialized by
1919
.BR io_uring_queue_init (3).
2020
It first unmaps the memory shared between the application and the kernel and then closes the io_uring file descriptor.
21+
22+
Some accounting is done asynchronously, so memory locked by
23+
.BR io_uring_queue_init (3)
24+
may remain locked for a few milliseconds after this function returns.
2125
.SH RETURN VALUE
2226
None
2327
.SH SEE ALSO

man/io_uring_queue_init.3

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@ and
118118
return 0 on success and
119119
.BR -errno
120120
on failure.
121+
A return value of
122+
.BR -ENOMEM
123+
indicates there is not enough locked memory available to hold the specified
124+
number of entries.
125+
Reduce the number of entries, or call
126+
.BR setrlimit (2)
127+
to increase the maximum number of bytes of memory that may be locked into RAM.
128+
Be aware that calling
129+
.BR io_uring_queue_init (3)
130+
and
131+
.BR io_uring_queue_exit (3)
132+
in a loop will temporarily lock a lot of memory, because
133+
.BR io_uring_queue_exit (3)
134+
does some of its accounting asynchronously.
121135

122136
.BR io_uring_queue_init_mem (3)
123137
returns the number of bytes used from the provided buffer on success, and

0 commit comments

Comments
 (0)