From f2ce0c26ed378670ac986883516496915ac202c8 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 24 Mar 2024 09:20:50 +0000 Subject: [PATCH] eio_linux: require Linux >= 5.15 This allows removing a work-around that required checking whether every flow was a tty (and which was doing this on every read). --- lib_eio_linux/eio_linux.ml | 7 ------- lib_eio_linux/sched.ml | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib_eio_linux/eio_linux.ml b/lib_eio_linux/eio_linux.ml index 75aacd6d5..745a97a43 100644 --- a/lib_eio_linux/eio_linux.ml +++ b/lib_eio_linux/eio_linux.ml @@ -154,16 +154,9 @@ module Flow = struct let close = Eio_unix.Fd.close - let is_tty t = Fd.use_exn "isatty" t Unix.isatty - let stat = Low_level.fstat let single_read t buf = - if is_tty t then ( - (* Work-around for https://github.com/axboe/liburing/issues/354 - (should be fixed in Linux 5.14) *) - Low_level.await_readable t - ); Low_level.readv t [buf] let pread t ~file_offset bufs = diff --git a/lib_eio_linux/sched.ml b/lib_eio_linux/sched.ml index fd5836984..b8894eb15 100644 --- a/lib_eio_linux/sched.ml +++ b/lib_eio_linux/sched.ml @@ -536,9 +536,9 @@ let with_sched ?(fallback=no_fallback) config fn = | exception Unix.Unix_error(EPERM, _, _) -> fallback (`Msg "io_uring is not available (permission denied)") | uring -> let probe = Uring.get_probe uring in - if not (Uring.op_supported probe Uring.Op.shutdown) then ( + if not (Uring.op_supported probe Uring.Op.mkdirat) then ( Uring.exit uring; - fallback (`Msg "Linux >= 5.11 is required for io_uring support") + fallback (`Msg "Linux >= 5.15 is required for io_uring support") ) else ( statx_works := Uring.op_supported probe Uring.Op.msg_ring; match