[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Ext4 and the "30 second window of death"
On Fri, 3 Apr 2009, Matthew Garrett wrote:

> On Fri, Apr 03, 2009 at 05:56:40AM +1100, Nick Piggin wrote:
>> On Friday 03 April 2009 05:38:34 Matthew Garrett wrote:
>>> On Fri, Apr 03, 2009 at 05:34:59AM +1100, Nick Piggin wrote:
>>>> Shouldn't applications have a mode to avoid spinning up the disk if it is
>>>> so important?
>>> They do. It's called "Don't use fsync() unless your data needs to be on
>>> disk". I'm not sure why you'd ever want an application to be in anything
>>> but this mode.
>> Well you might decide you are willing to sacrifice timely storage of
>> logs, or reducing backups in your editor or something. But obviously
>> the kernel can't decide which of those fsyncs is safe to omit (or
>> turn into a barrier) while staying within the advertised semantics of
>> the app. Application obviously can.
> I'd argue that if the user cares enough that they want it fsync()ed on
> ext3 then they probably also want it fsync()ed if they're on battery.
> But yes, if anything is going to make a distinction between grades of
> "Must be saved" then it has to be the application - the kernel certainly
> doesn't have that information.

but is it the user who's deciding today or the application developer?

I agree that the kernel has no way of saying 'this fsync is important,
that one can be ignored'

but I don't think anyone is suggesting that (everyone who has mentioned it
in a proposal has done so saying 'this obviously is too complicated to try
to do'

however, there is one thing about laptop mode that I need clarification

is laptop mode

A. "write everything now, don't delay writes" in the hope that the drive
will be idle enough later to spin down


B. "delay all writes until later, then when the drive wakes up do all
pending writes at that time" so that the drive can go to sleep in the

I've heard things in these threads that would indicate both behaviors.

David Lang

 \ /
  Last update: 2009-04-03 03:03    [W:0.099 / U:31.908 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site