Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

io_uring

From Wikipedia, the free encyclopedia
Linux kernel interface for storage devices

io_uring[a] is aLinux kernelsystem call interface for storage deviceasynchronous I/O operations addressing performance issues with similar interfaces provided by functions likeread()/write() oraio_read()/aio_write() etc. foroperations on data accessed byfile descriptors.[2][3]: 2 

Interface

[edit]

It works by creating twocircular buffers, called "queue rings", to track the submission and completion of I/O requests, respectively. For storage devices, these are called the submission queue (SQ) and completion queue (CQ).[4] Keeping these buffers shared between the kernel and application helps to boost theI/O performance by eliminating the need to issue extra and expensive system calls to copy these buffers between the two.[2][4][5] According to the io_uring design paper, the SQ buffer is writable only by consumer applications, and the CQ buffer is writable only by the kernel.[2]: 3 

eBPF can be combined with io_uring.[6]

History

[edit]

The Linux kernel has supportedasynchronous I/O since version 2.5, but it was seen as difficult to use and inefficient.[7] This older API only supported certain nicheuse cases,[8] notably it only enables asynchronous operation when using the O_DIRECT flag and while accessing already allocated files. This prevents utilizing thepage cache, while also exposing the application to complex O_DIRECT semantics. Linux AIO also does not support sockets, so it cannot be used to multiplex network and disk I/O.[9]

The io_uring kernel interface was adopted in Linux kernel version 5.1 to resolve the deficiencies of Linux AIO.[2][5][10] The liburing library provides anAPI to interact with the kernel interface easily fromuserspace.[2]: 12 

Security

[edit]

In June 2023, Google's security team reported that 60% of theexploits submitted to theirbug bounty program in 2022 were exploits of the Linux kernel's io_uring vulnerabilities. As a result,io_uring was disabled for apps inAndroid, and disabled entirely inChromeOS as well as Google servers.[11]Docker also consequently disabled io_uring from their defaultseccomp profile.[12]

Notes

[edit]
  1. ^Input/output user ring[1]

References

[edit]
  1. ^Axboe, Jens."@axboe@fosstodon.org".
  2. ^abcde"Linux Kernel Getting io_uring To Deliver Fast & Efficient I/O".Phoronix. 2019-02-14. Retrieved2021-03-14.
  3. ^Axboe, Jens (October 15, 2019)."Efficient IO with io_uring"(PDF). Archived from the original on October 10, 2025. RetrievedNovember 9, 2025.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  4. ^ab"Getting Hands-on with io_uring using Go".developers.mattermost.com. Retrieved2021-11-20.
  5. ^abCorbet, Jonathan (24 January 2020)."The rapid growth of io_uring [LWN.net]".lwn.net. Retrieved2021-11-20.
  6. ^Corbet, Jonathan (4 March 2021)."BPF meets io_uring [LWN.net]".LWN.net. Retrieved2023-04-17.
  7. ^Corbet, Jonathan (15 January 2019)."Ringing in a new asynchronous I/O API".LWN.net. Retrieved2021-03-14.
  8. ^"What's new with io_uring"(PDF). Archived from the original on 2022-06-01. Retrieved2022-06-01.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  9. ^"Linux Asynchronous I/O". 2014-04-21. Archived fromthe original on 2015-04-06. Retrieved2023-06-16.Blocking during io_submit on ext4, on buffered operations, network access, pipes, etc. Some operations are not well-represented by the AIO interface. With completely unsupported operations like buffered reads, operations on a socket or pipes, the entire operation will be performed during the io_submit syscall, with the completion available immediately for access with io_getevents. AIO access to a file on a filesystem like ext4 is partially supported: if a metadata read is required to look up the data block (ie if the metadata is not already in memory), then the io_submit call will block on the metadata read. Certain types of file-enlarging writes are completely unsupported and block for the entire duration of the operation.
  10. ^"Faster IO through io_uring".Kernel Recipes 2019.Archived from the original on 2025-04-24. Retrieved2025-04-24.
  11. ^Koczka, Tamás."Learnings from kCTF VRP's 42 Linux kernel exploits submissions".Google Online Security Blog. Google.Archived from the original on 2024-09-22. Retrieved14 June 2023.60% of the submissions exploited the io_uring component of the Linux kernel
  12. ^"Update RuntimeDefault seccomp profile to disallow io_uring related syscalls by vinayakankugoyal · Pull Request #9320 · containerd/containerd".GitHub. 2023-11-02.Archived from the original on 2024-01-06. Retrieved2024-10-20.

External links

[edit]
Organization
Kernel
Support
People
Technical
Debugging
Startup
ABIs
APIs
Kernel
System Call
Interface
In-kernel
Userspace
Daemons,
File systems
Wrapper
libraries
Components
Variants
Virtualization
Adoption
Range
of use
Adopters
Retrieved from "https://en.wikipedia.org/w/index.php?title=Io_uring&oldid=1321785732"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp