Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for June 20, 2013
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Now what about shutdown?
Posted Sep 25, 2008 15:13 UTC (Thu) by dmarti (subscriber, #11625)
Posted Sep 26, 2008 2:24 UTC (Fri) by njs (guest, #40338)
IIRC emacs (used to?) do this by default, and until I disabled that it was unusable on a laptop, because hitting C-x C-s blocked everything for a few seconds waiting for the drive to spin up. ELISP SMASH
When is "save" really "maybe save"?
Posted Sep 26, 2008 15:05 UTC (Fri) by dmarti (subscriber, #11625)
(And you could always do the fsync in a separate thread or process, so the app is responsive again.)
Posted Sep 26, 2008 21:43 UTC (Fri) by njs (guest, #40338)
If the goal is to reach a point where we can throw away a lot of data instead of flushing it to disk at shutdown, then this approach is making a classic mistake: it's trying to mark everything that *does* need to go to disk, and hoping that eventually everything will be marked and we'll be able to flip the switch and throw everything else away. The better approach is to mark stuff that isn't important, like some fcntl to request "power-loss semantics" for writes to some file; then you could get some win immediately, and expand it incrementally over time.
I doubt this is easy or important enough to actually get the coordinated effort needed to implement it, but that's how I'd do it...
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds