From d836624b3a7eb3433bdf8f7193b44daacd5ba6d1 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 21 Aug 2020 16:22:43 -0600 Subject: [PATCH] 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 --- engines/io_uring.c | 8 -------- 1 file changed, 8 deletions(-) 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) -- 2.25.1