Re: What happened to data=guarded?

From: Jan Kara
Date: Wed Aug 12 2009 - 16:38:07 EST


On Mon 10-08-09 18:42:05, Pavel Machek wrote:
> On Tue 2009-08-11 14:57:03, Theodore Tso wrote:
> > On Tue, Aug 11, 2009 at 05:29:14PM +0200, Andi Kleen wrote:
> > > > Good to hear. I've so far stayed with data=ordered as I think I'd prefer
> > > > data=guarded over data=writeback. I'll certainly give it a try when it's
> > > > available.
> > >
> > > Same here. data=writeback already cost me a few files after crashes here :/
> >
> > What sort of files were you losing? I don't know if we can improve
> > the implied flush hueristics, but we should at least try to see if we
> > do something about it.
>
> IIRC... the flush heuristics invoke async flush, so you can still lose
> data if you are unlucky, no?
Of course you can but it can happen in data=ordered mode as well (if the
machine crashes before the transaction is committed). The percieved
difference is in the fact that kjournald starts its commit every 5 seconds
while pdflush starts writeback every 30-35 seconds. So if you use
data=guarded/writeback mode and set dirty_expire_centisecs to 500, the
experience wrt. data loss is going to be similar to data=ordered mode.
fsync with heavy background writers won't be that painful as in data=ordered
mode but apart from that the performance will be probably comparable.

Honza
--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
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/