Starting to play with dependent SQEs for io_uring. Enables things like "read data from here, then write to there". Or "open this file, then read this data from it". It's a powerful primitive, and eliminates wait points in sequences of operations.
-
-
Replying to @axboe
Somewhat related: What I was looking for the other day was doing a buffered write, and wanting to trigger immediate writeback. One can achieve that by doing a write and then sync_file_range with SYNC_FILE_RANGE_WRITE (which is what postgres does).
1 reply 0 retweets 0 likes -
Replying to @AndresFreundTec @axboe
Doable with iouring, but I was wondering if there's a cheaper way than submitting those as separate queue entries.
1 reply 0 retweets 0 likes -
-
Replying to @axboe
The goal is to *initiate* immediate writeback, but not to block waiting for it. Now obviously the blocking doesn't matter as much when done through io_uring as it does for plain pwrite(), but it'd require much bigger uring sizes, and a lot more userland buffers for the writes.
2 replies 0 retweets 0 likes -
Replying to @AndresFreundTec
Gotcha, yeah then you probably just want to use an extra sqe entry for that. Outside of needing a bigger sqring size, not sure I follow the "lot more userland buffers" argument?
1 reply 0 retweets 0 likes
That was about using RWF_SYNC. Without that the time spent for buffered IO is just copying the buffer into the page cache. With SYNC the queue entry would only complete once the IO finished. So the userland buffer pointed to by the SQE can only be reused once the IO is done.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.