From: Jens Axboe Date: Fri, 21 Aug 2020 22:22:43 +0000 (-0600) Subject: engines/io_uring: don't attempt to set RLIMITs X-Git-Tag: fio-3.23~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d836624b3a7eb3433bdf8f7193b44daacd5ba6d1;p=fio.git engines/io_uring: don't attempt to set RLIMITs This was meant to be helpful, but it's actively harmful if we're not running as root. Just get rid of it, it's really no different than needing appropriate memlock limits for just the ring itself. Signed-off-by: Jens Axboe --- diff --git a/engines/io_uring.c b/engines/io_uring.c index 57925594..2b1b1357 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -574,14 +574,6 @@ static int fio_ioring_queue_init(struct thread_data *td) ld->ring_fd = ret; if (o->fixedbufs) { - struct rlimit rlim = { - .rlim_cur = RLIM_INFINITY, - .rlim_max = RLIM_INFINITY, - }; - - if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) - return -1; - ret = syscall(__NR_io_uring_register, ld->ring_fd, IORING_REGISTER_BUFFERS, ld->iovecs, depth); if (ret < 0)