Messages in this thread | | | From | John Bradford <> | Subject | Re: [RFC] first try for swap prefetch | Date | Fri, 11 Apr 2003 14:29:23 +0100 (BST) |
| |
> > Actually, it could potentially do something very useful - if you are > > using a laptop, or other machine where disks are spun down to save > > power, you might be swapping in data while the disk still happens to > > be spinning, rather than letting it spin down, then having to spin it > > up again - in that instance you are definitely gaining something, > > (more battery life). > > That sounds like a rather short disk spin down time (in which case you > might not be gaining all that much battery life given the constant spin > up/down), either that or you're paging in way too much stuff.
Sure, it's probably not going to happen with normal usage, but say you're using a large application, then load a web browser to read the documentaion, and part of the large application is swapped out. Once the web browser has loaded, it might free some RAM, and then you spend 10 minutes reading the documentation. The disk might spin down after five minutes, and then have to spin back up again when you switch back to your main application. We could possibly avoid this by swapping the pages back in after one minute of inactivity, then letting the disk spin down.
Infact, we could spin down the disk _immediately_, if we find that we can swap all of the pages back in to physical RAM. Of course, that would only make sense if the disk is being used primarily for swap, but it's a scenario where we could do better than we are at the moment.
John. - 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/
| |