On Fri, 23 Nov 2001, Andrew Morton wrote:
> Oliver Xymoron wrote:
> >
> > My laptop drive seems to be waking up more often today and I suspect it's
> > somehow ext3/kjournald that's to blame. Does it obey the timings in
> > /proc/sys/vm/bdflush or does it have its own flush timer?
>
> It has its own flush timer. This is something we need to crunch
> on and think about.
Ok. I think we'll probably end up needing per-device flush timers. Flushes
to jffs should work differently than flushes to disk, or to network
attached storage (iSCSI, nbd).
> > There's a more general problem with VM on laptops which is that the system
> > doesn't have any notion of spun-down disks. Flush intervals should be
> > short when the disk is running and long when it isn't and decisions about
> > which pages to discard or swap might be improvable. Pre-emptive swap when
> > the disk is spun down is a loss..
>
> Yup. The current VM is a bit too swap-happy, IMO. In try_to_free_pages(),
> replace `priority = DEF_PRIORITY' with `priority = DEF_PRIORITY + 2'.
>
> Also, if we had appropriate hooks into the request layer, we could detect
> when the disk was being spun up for a read, and opporunistically flush
> out any pending writes.
I think if the disk wakes up, then the time to next flush gets shortened
from long_interval to short_interval. If short_interval makes the next
flush in the past, it happens now. But if we sleep the disk and wake it up
immediately, we don't necessarily want to trigger a flush.
> Tell me if this is joyful:
Haven't tried it yet, but I'm afraid I don't see what makes it actually
sync with the dirty buffer flush. Wouldn't it be better to export a chain
of flush funcs hung off a timer?
-- "Love the dolphins," she advised him. "Write by W.A.S.T.E.."- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:36 EST