Only need to do syscall if something was submitted
This commit is contained in:
parent
37944ccffd
commit
f6e6f543c0
@ -288,10 +288,11 @@ final class IOUringSubmissionQueue {
|
||||
public void submit() {
|
||||
int submitted = flushSqe();
|
||||
logger.trace("Submitted: {}", submitted);
|
||||
|
||||
int ret = Native.ioUringEnter(ringFd, submitted, 0, 0);
|
||||
if (ret < 0) {
|
||||
throw new RuntimeException("ioUringEnter syscall");
|
||||
if (submitted > 0) {
|
||||
int ret = Native.ioUringEnter(ringFd, submitted, 0, 0);
|
||||
if (ret < 0) {
|
||||
throw new RuntimeException("ioUringEnter syscall");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user