Re: [PATCH] ide write barrier support

From: Anton Ertl
Date: Tue Oct 21 2003 - 14:28:08 EST


Jens Axboe <axboe@xxxxxxx> writes:
>Completely disabling write back caching on IDE drives totally kills
>performance typically, they are just not meant to be driven this way.

It has a significant performance impact, but I would not call it
"totally kills performance". In Section 7 of

http://www.complang.tuwien.ac.at/papers/czezatke%26ertl00/

you can find some numbers for ext2 with and without write-back caching
(and for other file systems without write-back caching). The slowdown
was about a factor 1.5 for an un-tar benchmark and 1 for an rm
benchmark (and of course 1 for the read-dominated tar and find
benchmarks).

IMO the OS should turn off write-back caching on all devices that have
journaling, log-structured or soft-updated file systems mounted,
unless the OS ensures correctness through write barriers, explicit
flushes or somesuch. I certainly turn off write-back caching on all
drives with ext3 file systems.

So I hope to see write barrier support in the Linux kernel at some
point in the future.

Concerning disk behaviour, I have certainly seen disks (with
write-back caching turned on) that don't write a block for many
seconds, while they write other, later (from the view of the CPU)
blocks. See

http://www.complang.tuwien.ac.at/anton/hdtest/

- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@xxxxxxxxxxxxxxxxxxxxxxxxxx Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/