On Wed, Oct 17, 2012 at 02:39:55AM +0000, Thor Lancelot Simon wrote: > On Mon, Oct 15, 2012 at 04:24:54PM +0200, Manuel Bouyer wrote: > > > > I wonder if we could reuse bits from the read-ahead code for write-behind ? > > I'm not sure the read-ahead code is working properly. When I read through > the filesystem with cat or dd bs=1024k, on a device (wd on ahcisata) > that can do 1M transfers, I see that most transfers are considerably > smaller.
For me it grows up to 512k, which is the limit in the read-ahead code. > > What I'm more worried about is that it may _never_ be a good idea, in the > general case, to put 1M transfers on the bus, particularly single writes, > since they may delay things like log transactions in the disk's write > cache. We might need a much safer I/O scheduler before we can safely do > this. Or we might need to let the user tune it on a per-filesystem basis. Note that with the current code, even if the write-behind code in ufs_readwrite limits the transfer, the pagedaemon can schedule writes of 1M when memory gets short. I've seen thoses when playing with the write-behind code (basically when I disabled write-behind, so writes got triggered by the pagedaemon). -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --