On Sun, Oct 12 2008, Avi Kivity wrote:
If you have a normal laptop, your disk has a cache. That cache does
not have a battery backup. Under normal operations, the cache is
acting in write-back mode and when you do a write, the disk will
report the write as completed even though it is not actually on disk.
If you really care about the data being on disk, you have to either
use a disk with a battery backed cache (much more expensive) or enable
write-through caching (will significantly reduce performance).
I think that with SATA NCQ, this is no longer true. The drive will
report the write complete when it is on disk, and utilize multiple
outstanding requests to get coalescing and reordering. Not sure about
It is still very true. Go buy any consumer drive on the market and check
the write cache settings - hint, it's definitely shipped with write back
caching. So while the drive may have NCQ and Linux will use it, the
write cache is still using write back unless you explicitly change it.