Re: faster boots?

Richard Gooch
2002-04-08T17:06:23Z

Oliver Neukum writes:
>
> > > and spin-up on any operation that writes to the disk (and block that
> > > operation).
> >
> > Absolutely not! I don't want my writes to spin up the drive.
>
> Even if you sync ?

I'm undecided. I think it's good to have a way to let the user force a
flush, but I don't like the same mechanism being used by applications
which think they know better. So flushing on sync(2) or f*sync(2) is
perhaps undesirable. Maybe the way to deal with this is to have:

- tunable flush time (i.e. how long to wait after a write(2) before
flushing, if the drive is currently unspun)

- tunable dirty pages limit (i.e. how many dirty pages allowed before
flushing)

- tunable "ignore *sync(2)" option. Default value is 0 (don't
ignore). When set to 1, ignore all calls to *sync(2).

So then on my 256 MiB laptop, I'd probably set the flush time to 3
hours, the dirty page limit to 64 MiB, and ignore *sync(2). I'd write
a suid-root programme which did:
enable_sync ();
sync ();
disable_sync ();

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca