Closed user8555 closed 3 years ago
There's no "would the kernel correctly order " - the kernel just does what it's told. For fio, the answer is possibly yes, if the job file is written as such that you could have reads and writes for the same block.
There's no "would the kernel correctly order " - the kernel just does what it's told
The kernel may indeed reorder, it's totally free to do so. The flawed concept here is that there's such a thing as right or wrong ordering, the kernel doesn't make any judgement on that. So yes, it's possible that you submit entry1 and entry2, and the kernel ends up issuing entry2 first. Or you can get entry1 issued first, then entry2, but entry2 will complete first.
@ajgopala :
To answer the question in the title
Would any FIO configuration ever issue reads to a block number when a write is outstanding for the same?
Yes I can construct a configuration that does. However can you reply if the serialize_overlap
option mentioned in the documentation addresses your issue?
I think so @sitsofe
There it says ...
When two or more I/Os are submitted simultaneously
Does it mean 2 io_submit calls or does it even include 1 io_submit call have 2 entries in it?
@ajgopala that question is looking a bit too narrowly at the problem... serialize_overlap
works irrespective of ioengine since operates at a higher level than syscalls. You can read 997b5680d139ce82c2034ba3a0d602cfd778b89b to see how it was initially implemented.
If this answers your question can you close this issue? Thanks!
Makes sense. Thanks.
If yes, would the linux kernel block automatically correctly order the read after the write to maintain the expected ordering?