Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reactor: io_uring: enable some optimization flags #2089

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 11, 2024

  1. reactor: io_uring: enable some optimization flags

    Enable some optimization flags in an attempt to improve performance
    with io_uring:
    
    IORING_SETUP_COOP_TASKRUN - prevents a completion from interrupting the
    reactor if it is running. Requires that the reactor issue an io_uring_enter
    system call in a timely fashion, but thanks to the task quota timer, we do.
    
    IORING_SETUP_TASKRUN_FLAG - sets up a flag that notifies the reactor
    that the kernel has pending completions that it did not process. This
    allows the reactor to issue an io_uring_enter even if it has no pending
    submission queue entries or completion queue entries (e.g. it indicates
    a third queue, in the kernel, is not empty).
    
    IORING_SETUP_SINGLE_ISSUER - elides some locking by guaranteeing that only
    a single thread plays with the ring; this happens to be true for us.
    
    IORING_SETUP_DEFER_TASKRUN - batches up completion processing in an
    attempt to get some more performance.
    
    This flags bump up the dependencies to Linux 6.1 and liburing 2.2. This
    seems worthwhile as right now io-uring lags behind linux-aio (which processes
    completions from interrupt context and therefore doesn't need all these
    optimizations).
    
    After this exercise, io_uring is still slower than linux-aio.
    avikivity committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    9685e8e View commit details
    Browse the repository at this point in the history