Re: About the need of a swap area

Ville Herva (vherva@niksula.hut.fi)
Sun, 28 Jul 2002 18:57:15 +0300


On Sun, Jul 28, 2002 at 11:11:57AM -0300, you [Rik van Riel] wrote:
> On Sun, 28 Jul 2002, Ville Herva wrote:
>
> > If you have swap, it makes sense to use it. What doesn't make
> > sense is to waste time waiting for paging to happen.
>
> Unless of course you're running on battery power...

Well, that of course an entirely different (and I might call it special)
condition.

In theory you could still write anonymous pages to swap device, and then
have the swap disk spun down/go to powersave state. The swap space is still
in use, but you take the "do not spin up/use the disk, please" requirement
in consideration by not dropping the swap-backed in-memory pages. Once the
swap disk is spun up, you restore the normal operating mode and take
advantage of the still swap-backed anonymous pages (provided of course they
haven't been dirtied in between).

That of course is only theoretical speculation. Surely no os goes that far.
I understand linux even hasn't a mechanism to avoid swapping when power
needs to be saved?

-- v --

v@iki.fi
-
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/