[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0903271058060.3994@localhost.localdomain>
Date: Fri, 27 Mar 2009 11:05:58 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
cc: Matthew Garrett <mjg59@...f.ucam.org>,
Theodore Tso <tytso@....edu>,
Andrew Morton <akpm@...ux-foundation.org>,
David Rees <drees76@...il.com>, Jesper Krogh <jesper@...gh.cc>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 2.6.29
On Fri, 27 Mar 2009, Alan Cox wrote:
>
> The kernel cannot tell them apart, while fsync/close() as a pair allows
> the user to correctly indicate their requirements.
Alan. Repeat after me: "fsync()+close() is basically useless for any app
that expects user interaction under load".
That's a FACT, not an opinion.
> For an event driven app you really want some kind of threaded or async
> fsync then close
Don't be silly. If you want data corruption, then you make people write
threaded applications. Yes, you may work for Intel now, but that doesn't
mean that you have to drink the insane cool-aid. Threading is HARD. Async
stuff is HARD.
We kernel people really are special. Expecting normal apps to spend the
kind of effort we do (in scalability, in error handling, in security) is
just not realistic.
> Agreed - which is why close should not happen to do an fsync(). That's
> their problem for writing code thats specific to some random may happen
> behaviour on certain Linux releases - and unfortunately with no obvious
> cheap cure.
I do agree that close() shouldn't do an fsync - simply for performance
reasons.
But I also think that the "we write meta-data synchronously, but then the
actual data shows up at some random later time" is just crazy talk. That's
simply insane. It _guarantees_ that there will be huge windows of times
where data simply will be lost if something bad happens.
And expecting every app to do fsync() is also crazy talk, especially with
the major filesystems _sucking_ so bad at it (it's actually a lot more
realistic with ext2 than it is with ext3).
So look for a middle ground. Not this crazy militant "user apps must do
fsync()" crap. Because that is simply not a realistic scenario.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists