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

Add IORING_SETUP_DEFER_TASKRUN flag to uring_type.hpp if Kernel >= 6.1 #40

Closed
GavinRay97 opened this issue Nov 15, 2022 · 1 comment
Closed
Labels
done A fix has been provided enhancement New feature or request

Comments

@GavinRay97
Copy link

IORING_SETUP_DEFER_TASKRUN

By default, io_uring will process all outstanding work at the end of any system call or thread interrupt. This can delay the application from making other progress. Setting this flag will hint to io_uring that it should defer work until an io_uring_enter(2) call with the IORING_ENTER_GETEVENTS flag set. This allows the application to request work to run just before it wants to process completions. This flag requires the IORING_SETUP_SINGLE_ISSUER flag to be set, and also enforces that the call to io_uring_enter(2) is called from the same thread that submitted requests. Note that if this flag is set then it is the application's responsibility to periodically trigger work (for example via any of the CQE waiting functions) or else completions may not be delivered. Available since 6.1.

#if LIBURINGCXX_IS_KERNEL_REACH(6, 1)
    | IORING_SETUP_DEFER_TASKRUN
#endif

axboe/liburing#536 (comment)

image

@Codesire-Deng
Copy link
Owner

Thanks for sharing this information. The flag is welcomed and will be set properly ASAP after the kernel upgrade. Since our kernel is 6.0.8 and it synchronizes with some pacman-mirrors, we can't just upgrade it right now. But it won't take long I guess.

By the way, that liburing issue you mentioned is quite interesting. 🤣 I love it.

@Codesire-Deng Codesire-Deng added the enhancement New feature or request label Dec 12, 2022
@Codesire-Deng Codesire-Deng added the done A fix has been provided label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done A fix has been provided enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants