Ideally what i would like to see would be,
1 Just before the APM spins down the disk, a sync should be done.
Though i'm not actually sure there's any way to request such notice.
2 Whenever the disk is spun down sys_bdflush should be a noop
The idea being that eventually a read will wake up the disk and all
those dirty buffers will be flushed within five seconds. This will
suck up a lot buffers but if the free list is empty refill_freelist
will still work fine.
3 A lot better behaviour in keeping unused buffers around
Currently if i run the same program repeatedly i still occasionally
hear pages getting read. And if i run a program every 30s it has to
be paged in every time.
I realize the buffer architecture has changed in 2.1 hopefully it has
improved on the last point.
Incidentally if you're worried about buffers not being committed soon
enough and users losing critical data, frankly, hearing the disk spin
down is a pretty unambiguous interface indicating that if the machine
panicked right that moment any writes would be lost. Users can always
run `sync' if it's absolutely critical.
greg