0

I think the following statements about CFQ contradict each other:

  1. "In case of asynchronous requests, all the requests from all the processes are batched together according to their process's I/O priority."
  2. The only requests that the IO scheduler considers to be asynchronous are regular "buffered" writes.
  3. "ionice does nothing to de-prioritize asynchronous write IO."

Which statements are incorrect? Or if all of them are correct, why do they not contradict each other?

1 Answer 1

0

I believe statements 2 and 3 are incorrect.

It is possible for a user process to generate asynchronous write IOs using sync_file_range(). Since these IOs are submitted directly by the calling process, they could be affected by the process' IO priority.

sync_file_range() is designed to allow triggering async writeback. The current implementation (Linux v4.20) avoids setting REQ_SYNC, by using the writeback mode WB_SYNC_NONE. This is true even when your program waits for the writeback by including the flag SYNC_FILE_RANGE_WAIT_AFTER. (However, kernels between v2.6.29 and v4.4 incorrectly used WB_SYNC_ALL and hence REQ_SYNC for all writeback triggered by sync_file_range()).

I guess the process IO priority might also get used if it had to perform "direct reclaim" during an async write() call. That was allegedly gotten rid of in 2011.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .