aio: io_uring: Allow IO methods to check if IO completed in the background Until now pgaio_wref_check_done() with io_method=io_uring would not detect if IOs are known to have completed to the kernel, but the completion has not yet been consumed by userspace. This can lead to inferior performance and also makes it harder to use smarter feedback logic in read_stream, because we cannot use knowledge about whether an IO completed to control the readahead distance.
This commit just adds the io_uring specific infrastructure. Later commits will return whether a wait was needed from WaitReadBuffers() and then use that knowledge. Reviewed-by: Melanie Plageman <[email protected]> Reviewed-by: Nazir Bilal Yavuz <[email protected]> Discussion: https://postgr.es/m/f3xxfrkafjxpyqxywcxricxgyizjirfceychyxsgn7bwjp5eda@kwbduhy7tfmu Discussion: https://postgr.es/m/CAH2-Wz%3DkMg3PNay96cHMT0LFwtxP-cQSRZTZzh1Cixxf8G%3Dzrw%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6e648e353fa04ad86f896da347bbb9b51bc98ad4 Modified Files -------------- src/backend/storage/aio/aio.c | 20 ++++++++++---- src/backend/storage/aio/method_io_uring.c | 43 +++++++++++++++++++++++++++++++ src/include/storage/aio_internal.h | 15 +++++++++++ 3 files changed, 73 insertions(+), 5 deletions(-)
