crosvm/io_uring/Cargo.toml
Chirantan Ekbote 1fcc8a8f3c io_uring: Make UringContext Sync
Rather than requiring callers to wrap the entire UringContext in a big
lock, make UringContext Sync by internally using fine-grained locks:

* The submit queue is wrapped with a Mutex so that threads may still add
  operations to the submit queue even when a thread is blocked
  inside an io_uring_enter call.
* The completion queue internally uses a Mutex around the pending op
  data and completed count so that two threads don't end up trying to
  remove the same operation from the completed queue.

With this we can enable the await_uring_from_poll test.  This test
uncovered missing wakeups in the case where a uring operation is added
from one thread while the main uring thread is blocked inside an
io_uring_enter syscall. To deal with this, we call submit() whenever the
pending operation is polled and not yet submitted.

BUG=none
TEST=unit tests

Change-Id: I4c7dec65c03b7b10014f4a84d2cd16fe8758ea72
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2643842
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2021-01-26 09:15:11 +00:00

18 lines
351 B
TOML

[package]
name = "io_uring"
version = "0.1.0"
authors = ["The Chromium OS Authors"]
edition = "2018"
[dependencies]
data_model = { path = "../data_model" }
libc = "*"
syscall_defines = { path = "../syscall_defines" }
sync = { path = "../sync" }
sys_util = { path = "../sys_util" }
[dev-dependencies]
tempfile = { path = "../tempfile" }
[workspace]