Jump to content

Io uring: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
remove duplicate Short description template
Changing short description from "Asynchronous Linux Input/Output API" to "Linux kernel interface for storage devices"
Line 1: Line 1:
{{Short description|Asynchronous Linux Input/Output API}}
{{Short description|Linux kernel interface for storage devices}}
{{DISPLAYTITLE:io_uring}}
{{DISPLAYTITLE:io_uring}}
'''io_uring''' (previously known as '''aioring''') is a [[Linux kernel]] [[system call]] interface for storage device [[asynchronous I/O]] operations addressing performance issues with similar interfaces provided by functions like {{Code|read()}}/{{Code|write()}} or {{Code|aio_read()}}/{{Code|aio_write()}} etc. for [[file operation|operations]] on data accessed by [[file descriptor]]s.<ref name="Axboe2019" /><ref>{{Cite web|last=Axboe|first=Jens|date=October 15, 2019|title=Efficient IO with io_uring|url=https://kernel.dk/io_uring.pdf|url-status=live}}</ref>{{Rp|page=2}}
'''io_uring''' (previously known as '''aioring''') is a [[Linux kernel]] [[system call]] interface for storage device [[asynchronous I/O]] operations addressing performance issues with similar interfaces provided by functions like {{Code|read()}}/{{Code|write()}} or {{Code|aio_read()}}/{{Code|aio_write()}} etc. for [[file operation|operations]] on data accessed by [[file descriptor]]s.<ref name="Axboe2019" /><ref>{{Cite web|last=Axboe|first=Jens|date=October 15, 2019|title=Efficient IO with io_uring|url=https://kernel.dk/io_uring.pdf|url-status=live}}</ref>{{Rp|page=2}}

Revision as of 19:37, 11 December 2022

io_uring (previously known as aioring) is a Linux kernel system call interface for storage device asynchronous I/O operations addressing performance issues with similar interfaces provided by functions like read()/write() or aio_read()/aio_write() etc. for operations on data accessed by file descriptors.[1][2]: 2 

It was primarily developed by Jens Axboe at Facebook.[1]

Interface

Internally it works by creating two buffers dubbed as "queue rings" (circular buffers) for storage of submission and completion of I/O requests (for storage devices, submission queue (SQ) and completion queue (CQ) respectively).[3] Keeping these buffers shared between the kernel and application helps to boost the I/O performance by eliminating the need to issue extra and expensive system calls to copy these buffers between the two.[1][4][3] According to the io_uring design paper, the SQ buffer is writable only by consumer application, and the CQ buffer only by the kernel.[1]: 3 

The API provided by liburing library for userspace (applications) can be used to interact with the kernel interface more easily.[1][1]: 12 

Both kernel interface and library were adopted in Linux 5.1 kernel version.[1][4][5]

The Linux kernel has had asynchronous I/O since version 2.5, but it was seen as difficult to use and inefficient.[6] The old API only supported certain niche use cases.[7]

References

  1. ^ a b c d e f g "Linux Kernel Getting io_uring To Deliver Fast & Efficient I/O - Phoronix". Phoronix. Retrieved 2021-03-14.{{cite web}}: CS1 maint: url-status (link)
  2. ^ Axboe, Jens (October 15, 2019). "Efficient IO with io_uring" (PDF).{{cite web}}: CS1 maint: url-status (link)
  3. ^ a b "Getting Hands-on with io_uring using Go". developers.mattermost.com. Retrieved 2021-11-20.
  4. ^ a b "The rapid growth of io_uring [LWN.net]". lwn.net. Retrieved 2021-11-20.
  5. ^ "Faster IO through io_uring | Kernel Recipes 2019". Retrieved 2021-03-14.
  6. ^ Corbet, Jonathan. "Ringing in a new asynchronous I/O API". LWN.net. Retrieved 2021-03-14.{{cite web}}: CS1 maint: url-status (link)
  7. ^ "What's new with io_uring" (PDF). Retrieved 2022-06-01.