authorgravatar for 76793979+lorislibralato@users.noreply.github.comloris <76793979+lorislibralato@users.noreply.github.com> 2023-12-10 15:14:40+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-12-12 06:49:19+02:00
log37458cc886f8c6347b0e3e58965637656d86f9f9
tree2d5bac54882c5976599b1a120fc626865ee3d572
parent5c1428ea9db6c455fdd36b60fe6cd27b9e8eae4d

allow sqe entries up to 32768


1 files changed, 3 insertions(+), 3 deletions(-)

lib/std/os/linux/io_uring.zig+3-3
......@@ -15,11 +15,11 @@ pub const IO_Uring = struct {
1515 features: u32,
1616
1717 /// A friendly way to setup an io_uring, with default linux.io_uring_params.
18 /// `entries` must be a power of two between 1 and 4096, although the kernel will make the final
18 /// `entries` must be a power of two between 1 and 32768, although the kernel will make the final
1919 /// call on how many entries the submission and completion queues will ultimately have,
2020 /// see https://github.com/torvalds/linux/blob/v5.8/fs/io_uring.c#L8027-L8050.
2121 /// Matches the interface of io_uring_queue_init() in liburing.
22 pub fn init(entries: u13, flags: u32) !IO_Uring {
22 pub fn init(entries: u16, flags: u32) !IO_Uring {
2323 var params = mem.zeroInit(linux.io_uring_params, .{
2424 .flags = flags,
2525 .sq_thread_idle = 1000,
......@@ -31,7 +31,7 @@ pub const IO_Uring = struct {
3131 /// queue thread cpu affinity or thread idle timeout (the kernel and our default is 1 second).
3232 /// `params` is passed by reference because the kernel needs to modify the parameters.
3333 /// Matches the interface of io_uring_queue_init_params() in liburing.
34 pub fn init_params(entries: u13, p: *linux.io_uring_params) !IO_Uring {
34 pub fn init_params(entries: u16, p: *linux.io_uring_params) !IO_Uring {
3535 if (entries == 0) return error.EntriesZero;
3636 if (!std.math.isPowerOfTwo(entries)) return error.EntriesNotPowerOfTwo;
3737