|
|
Subscribe / Log in / New account

Synchronous

Synchronous

Posted Dec 5, 2024 17:10 UTC (Thu) by corbet (editor, #1)
In reply to: Synchronous by Sesse
Parent article: The return of RWF_UNCACHED

Reads are always synchronous, which is why the kernel often prioritizes them. From the prospective of user space, though, writes are not synchronous, in that you do not have to wait for the data to land in persistent storage. Plus you get elimination of many duplicate writes and combining of operations, which helps performance a lot. Direct I/O does not give you that; part of the point of RWF_UNCACHED is to make those benefits available without flooding the page cache.


to post comments

Synchronous

Posted Dec 5, 2024 20:19 UTC (Thu) by andresfreund (subscriber, #69562) [Link]

And sequential reads are also not really synchronous - the kernel will perform readahead for you. DIO won't. IME it's a often a lot easier to convert write paths to use DIO than read paths, more complicated heuristics are needed to implement application level readahead.

Synchronous

Posted Dec 5, 2024 20:25 UTC (Thu) by malmedal (subscriber, #56172) [Link] (1 responses)

Also, I believe you avoid some kernel buffering on direct io reads, that's the reason for the alignment restrictions?

Synchronous

Posted Dec 5, 2024 20:27 UTC (Thu) by corbet (editor, #1) [Link]

Direct I/O always avoids kernel buffering — that's the "direct" part :)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds