ext3 barrier bits
May as well cc lkml on this. It's to do with the disk write barrier implementation.
- How do I know that the barrier code is actually doing stuff? It doesn't seem to affect benchmarks much, if at all.
- Does reiserfs support `mount -o remount,barrier=flush'? and "=none"?
- How do I test the "oh, barriers aren't working" fallback code in ext3?
- Does the kernel tell you if your disk doesn't supoprt barriers? ie:
how does the user know if it's working or not?
Quoted 3 lines
- Does the kernel tell you if your disk doesn't supoprt barriers? ie:
how does the user know if it's working or not?
... and how do you know your disk isn't lying and ignoring the barriers?
"Storage is a Lie" -- Andre
Quoted 7 lines · Arjan van de Ven
Quoted 4 lines
- Does the kernel tell you if your disk doesn't supoprt barriers? ie:
how does the user know if it's working or not?... and how do you know your disk isn't lying and ignoring the barriers?
If some benchmark slows down when barriers are enabled then that's a pretty good indicator. I don't know what benchmark that might be though.
Quoted 7 lines · Andrew Morton
May as well cc lkml on this. It's to do with the disk write barrier implementation.
- How do I know that the barrier code is actually doing stuff? It doesn't seem to affect benchmarks much, if at all.
Usually not a lot of barriers would be generated. If you use reiser and heavy fsync load, it should be pretty apparent of barriers are issued or not (ie compare without barrier + wb cache, with barrier + wb cache, and with/without - wb cache).
Quoted 1 line
- Does reiserfs support `mount -o remount,barrier=flush'? and "=none"?
Chris?
Quoted 1 line
- How do I test the "oh, barriers aren't working" fallback code in ext3?
A quick hack would be to replace 'err' with '1' in this line in drivers/ide/ide-io.c:void ide_end_drive_cmd():
if (blk_barrier_preflush(rq) || blk_barrier_postflush(rq))
ide_complete_barrier(drive, rq, err);that'll fail the first barrier, should trigger the fall back. Or just try -o barrier=flush on a SCSI drive, should fail the barrier too.
Quoted 2 lines
- Does the kernel tell you if your disk doesn't supoprt barriers? ie:
how does the user know if it's working or not?
IDE will not tell you, the file system should flag the disabling of barriers (like reiser currently does). Try SCSI case again.
Signature · 1 line
Jens Axboe
Quoted 5 lines · Arjan van de Ven
Quoted 3 lines
- Does the kernel tell you if your disk doesn't supoprt barriers? ie:
how does the user know if it's working or not?... and how do you know your disk isn't lying and ignoring the barriers?
Easy to find out, time it. Or invent more imaginative cases where you actually test if it's there.
Signature · 1 line
Jens Axboe
Quoted 11 lines · Andrew Morton
Quoted 7 lines · Arjan van de Ven
Quoted 4 lines
- Does the kernel tell you if your disk doesn't supoprt barriers? ie:
how does the user know if it's working or not?... and how do you know your disk isn't lying and ignoring the barriers?
If some benchmark slows down when barriers are enabled then that's a pretty good indicator. I don't know what benchmark that might be though.
synctest -t 20 -n 1 -f dir, should show a performance hit when barriers are on.
-chris
Quoted 5 lines · Andrew Morton
May as well cc lkml on this. It's to do with the disk write barrier implementation.
- Does reiserfs support `mount -o remount,barrier=flush'? and "=none"?
Yes...there are no messages to clue the user in, but it does happen.
Quoted 2 lines
- How do I test the "oh, barriers aren't working" fallback code in ext3?
Jens suggested mounting with barriers on for scsi, that's what I've been doing. I also did some crash tests on scsi to make sure the io really is happening when barriers fail.
-chris