aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorDave Chinner <[email protected]>2011-01-11 10:22:40 +1100
committerDave Chinner <[email protected]>2011-01-11 10:22:40 +1100
commiteda77982729b7170bdc9e8855f0682edf322d277 (patch)
tree09ed733da9142ba979d6440add49f05772da11a4 /tools/perf/util/trace-event-scripting.c
parent4d8d15812fd9bc96d0da11467d23e0373feae933 (diff)
xfs: serialise unaligned direct IOs
When two concurrent unaligned, non-overlapping direct IOs are issued to the same block, the direct Io layer will race to zero the block. The result is that one of the concurrent IOs will overwrite data written by the other IO with zeros. This is demonstrated by the xfsqa test 240. To avoid this problem, serialise all unaligned direct IOs to an inode with a big hammer. We need a big hammer approach as we need to serialise AIO as well, so we can't just block writes on locks. Hence, the big hammer is calling xfs_ioend_wait() while holding out other unaligned direct IOs from starting. We don't bother trying to serialised aligned vs unaligned IOs as they are overlapping IO and the result of concurrent overlapping IOs is undefined - the result of either IO is a valid result so we let them race. Hence we only penalise unaligned IO, which already has a major overhead compared to aligned IO so this isn't a major problem. Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Alex Elder <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions