[ltp] Re: solid state drive?
Theodore Tso
linux-thinkpad@linux-thinkpad.org
Wed, 18 Feb 2009 15:45:58 -0500
On Wed, Feb 18, 2009 at 08:32:03PM +0000, Richard Neill wrote:
>
> Doesn't laptop mode do something to change this, i.e. pretend that sync
> has taken place when it hasn't?
Not today. I did talk with the Laptop Mode developer at FOSDEM about
2 weeks ago about the possibility of adding something like that ---
but the political issues make it a little contentious, since it means
violating POSIX guarantees and taking control out of the hands of the
application programmer about when something is guaranteed to be on
disk or not.
This is basically sort of like TeX, where there are differing levels
of "infinity" in terms of how hard \hfil, \hfill, and \hfilll will
force words to be typeset flush against a margin. An e-mail server
might want a different level of No, really, this MUST MUST MUST be on
disk compared to firefox which is randomly calling sync because it
thinks its config file ought to make it to media more regularly.
And the thing which scares me is various GNOME and KDE applications
with potentially hundreds of tiny little dot files; if some
application writer were to call fsync() after each one, it would be a
complete performance disaster for ext3.
We think we came up with a way that should work --- basically a
process personality flag which causes fsync to work normally (the
default), be ignored, or be ignored only if a certain global kernel
flag which would be set/reset by laptop mode ) that would be inherited
across fork and exec's. That way you could use a PAM login module to
turn on the process personality flag, but it wouldn't necessarily
affect system daemons unless they explicitly turn on/off the flag
themselves.
- Ted