-
- Downloads
[IO] prevent concurrent access to io_uring SQs
Futures completed by the globalCompleter thread are resubmitted if if needed into the new global IoContext of the Runtime handled by the globalCompleter. Additional Changes: * use two meson options io_uring_worker_entries and io_uring_global_entries to configure the amount of entries in the io_urings. * Initialize all worker IoContexts and submit their eventfds to the globalIo before starting the globalCompleter in order to make synchronizing the SQ of the globalIo unnecessary * delete all allocated IoContexts * don't use a static IoContext member variable to access the Runtime's globalIo. Store the global IoContext in the runtime object. * Commit each sqe immediately to the io_uring to prevent full SQs. This and the fact that the kernel consumes committed sqes emptying the SQ make busy loops around io_uring_get_sqe unnecessary. * handle bool and "raw" meson options differently to prevent comparison of different types
Showing
- emper/Runtime.cpp 27 additions, 7 deletionsemper/Runtime.cpp
- emper/Runtime.hpp 17 additions, 1 deletionemper/Runtime.hpp
- emper/io/Future.cpp 26 additions, 43 deletionsemper/io/Future.cpp
- emper/io/IoContext.cpp 82 additions, 76 deletionsemper/io/IoContext.cpp
- emper/io/IoContext.hpp 18 additions, 13 deletionsemper/io/IoContext.hpp
- emper/io/Stats.cpp 2 additions, 5 deletionsemper/io/Stats.cpp
- emper/io/Stats.hpp 8 additions, 19 deletionsemper/io/Stats.hpp
- meson.build 12 additions, 4 deletionsmeson.build
- meson_options.txt 9 additions, 3 deletionsmeson_options.txt
Loading