Skip to content

Commit d26184d

Browse files
committed
eio_linux: don't record submit events when there's nothing to submit
1 parent 73f913c commit d26184d

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM ocaml/opam:debian-11-ocaml-5.1
1+
FROM ocaml/opam:debian-11-ocaml-5.2
22
# Make sure we're using opam-2.1:
33
RUN sudo ln -sf /usr/bin/opam-2.1 /usr/bin/opam
44
# Ensure opam-repository is up-to-date:
5-
RUN cd opam-repository && git pull -q origin 0ac3fc79fd11ee365dd46119d43e9763cf57da52 && opam update
5+
RUN cd opam-repository && git pull -q origin 97de3378749cf8d2d70a5d710d310e5cc17c9dea && opam update
66
# Install utop for interactive use:
77
RUN opam install utop fmt
88
# Install Eio's dependencies (adding just the opam files first to help with caching):

bench.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM ocaml/opam:debian-11-ocaml-5.1
1+
FROM ocaml/opam:debian-11-ocaml-5.2
22
# Make sure we're using opam-2.1:
33
RUN sudo ln -sf /usr/bin/opam-2.1 /usr/bin/opam
44
# Ensure opam-repository is up-to-date:
5-
RUN cd opam-repository && git pull -q origin 0ac3fc79fd11ee365dd46119d43e9763cf57da52 && opam update
5+
RUN cd opam-repository && git pull -q origin 97de3378749cf8d2d70a5d710d310e5cc17c9dea && opam update
66
# Install Eio's dependencies (adding just the opam files first to help with caching):
77
RUN mkdir eio
88
WORKDIR eio

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
(logs (and (>= 0.7.0) :with-test))
3939
(fmt (>= 0.8.9))
4040
(cmdliner (and (>= 1.1.0) :with-test))
41-
(uring (>= 0.7))))
41+
(uring (>= 0.9))))
4242
(package
4343
(name eio_posix)
4444
(allow_empty) ; Work-around for dune bug #6938

eio_linux.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ depends: [
1616
"logs" {>= "0.7.0" & with-test}
1717
"fmt" {>= "0.8.9"}
1818
"cmdliner" {>= "1.1.0" & with-test}
19-
"uring" {>= "0.7"}
19+
"uring" {>= "0.9"}
2020
"odoc" {with-doc}
2121
]
2222
build: [

lib_eio_linux/sched.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ let enter op fn =
113113
Effect.perform (Enter fn)
114114

115115
let submit uring =
116-
Trace.with_span "submit" (fun () -> Uring.submit uring)
116+
if Uring.sqe_ready uring > 0 then
117+
Trace.with_span "submit" (fun () -> Uring.submit uring)
118+
else
119+
0
117120

118121
let rec enqueue_job t fn =
119122
match fn () with

0 commit comments

Comments
 (0)