[lkml]   [2011]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [rfc] Ignore Fsync Calls in Laptop_Mode
On Wed, May 25, 2011 at 8:50 AM, Oliver Neukum <> wrote:
> Am Mittwoch, 25. Mai 2011, 02:00:03 schrieb Dave Chinner:
> > Oh, you're talking about application level write ordering.
> > Besides, having to work out how to handle subtle application write
> > ordering bugs because you changed fsync semantics is simply another
> > reason for not changing behaviour in the first place.
> Sure. I'd say changing the behavior is right out. The question is whether
> we want an additional "superlaptop"-mode.

Exactly. 0.5 Watts is a lot of energy on a modern system. And on some
systems with proper link power management in sata and pcie it will be
even higher (~1 Watt I think). Think not only of the work that will be
lost if the system crashes (unlikely), but also of the work that could
never be done because the battery was gone (a certainty).
> And even in this case it seems to me that fsync() cannot be reduced to
> a nop because of ordering constraints. But perhaps we should then consider
> exporting an ordering primitive to user space.

That seems to be the big ordering issue. I had always assumed that
user space writes (by the same app to the same file) would be
committed in order. Is that really not the case?

Wouldn't most app programmers assume ordering? Wouldn't that always
possibly be an issue? Or do all the apps that require ordered writes
use fsync. There will surely be some who require ordering but don't
fsync. And without ordering, some apps won't be able to avoid fsync
without data safety issues.

It would seem that even ordering writes by default could not be a data
safety issue. But I guess performance would be affected negatively in
some cases. And behavior shouldn't be changed. So yes, it seems an
ordering primitive would be a good idea.

 \ /
  Last update: 2011-05-26 09:05    [W:0.110 / U:20.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site