Skip to content
  • Florian Fischer's avatar
    [IO] prevent concurrent access to io_uring SQs · 5d29c7e5
    Florian Fischer authored
    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
    5d29c7e5