[PATCH] when logging out, sync() all data in background to disc
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Fri Aug 22 23:09:30 CEST 2008
Kok, Auke wrote:
> ===
> New patch filed here: http://bugzilla.xfce.org/show_bug.cgi?id=4313
> ===
>
> Another patch for speedups! This one however speeds things up when the system is
> shutting down!
>
> On netbooks where we have slow-to-write SSD devices, shutdown can be painful as
> flushing all the dirty data to disc is quite a penalty, slowing down shutdown by
> seconds.
>
> A quick helping hand can be given by xfce4 if it calls sync() when the user
> appears to be going-to-shutdown. The xfce4-session-logout application is the
> central point that is initially called if the user selects any of the `exit` paths
> in xfce4. By inserting an asynchronous `sync();` call as the very first action
> that xfce4-session-logout does, data is being flushed to disc even before the
> `logout` and `shutdown` buttons appear on screen.
>
> This helps a lot with shutdown time, as the user usually needs at least a whole
> second to locate the appropriate button on the screen with his mouse and click it.
> In that time we could have flushed a significant amount of data back to disc
> already. And that's exactly what this patch does.
>
> The patch is against 4-4, but I assume just like the other patch that it applies
> against trunk just fine as well.
You should use _exit instead of exit for the child process, just to be sure.
> Cheers,
> Auke
Benedikt
More information about the Xfce4-dev
mailing list