Re: Linux 2.6.29

From: Jeff Garzik
Date: Fri Mar 27 2009 - 15:43:54 EST


Linus Torvalds wrote:
So the fact is, "people should always use fsync" simply isn't a realistic expectation, nor is it historically accurate. Claiming it is is just obviously bogus. And claiming that people _should_ do it is crazy, since it performs badly enough to simply not be realistic.

Alternatives should be looked at. For desktop apps, the best alternatives are likely simply stronger default consistency guarantees. Exactly the "we don't guarantee that your data hits the disk, but we do guarantee that if you renamed on top of another file, you'll not have lost _both_ contents".

On the other side of the coin, major desktop apps Firefox and Thunderbird already use it: Firefox uses sqlite to log open web pages in case of a crash, and sqlite in turn sync's its journal as any good database app should. [I think tytso just got them to use fdatasync and a couple other improvements, to make this not-quite-so-bad]

Thunderbird hits the disk for each email received -- always wonderful with those 1000-email git-commit-head downloads... :)

So, arguments about "people should..." aside, existing desktops apps _do_ fsync and we get to deal with the bad performance :/

Jeff


--
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/