Messages in this thread | | | From | John Bradford <> | Subject | Completely new idea to virtual memory (Was: Re: [RFC] first try for swap prefetch) | Date | Fri, 11 Apr 2003 18:39:18 +0100 (BST) |
| |
> > We could possibly avoid this by swapping the pages back > > in after one minute of inactivity, then letting the > > disk spin down. > > > Why not also write pages out to swap before it's really necessary? > If they were left mapped but marked as having up-to-date copies > on swap, they could be discarded immediately if the system needed > memory. (Of course if they got written to they would have to be > paged out again.)
Hmmm, interesting...
The laptop-with-disk-configured-to-spin-down scenario would seem, (in theory), to benefit from a completely different approach to swapping to what we have at the moment.
Instead of trying to minimise the I/O bandwidth used, we could more or less ignore it, but consider the initial request, (after a certain timeout), to be very expensive.
So, all the time the disk was spinning, we'd make sure that the swap area contained the most useful data, possibly duplicating what was in RAM, and then spin the disk down at the earliest opportunity. That way, you could effectively swap in and swap out without spinning the disk up.
(Obviously, you can't do _both_ :-), but the idea would be to either swap out a lot, or swap in a lot, before spinning down, that way you get a 'free' swap either way, and consolidate disk reads/writes).
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/
| |