Re: just a small VM idea

From: Tigran Aivazian (tigran@veritas.com)
Date: Sun Oct 22 2000 - 04:35:46 EST


On Sun, 22 Oct 2000, Samium Gromoff wrote:

> Let`s imagine were having two mounted swap partitions.

swap partitions are never mounted, there is no swapfs for Linux (and it is
arguable whether we need one).

> Current situation, if im not going wrong is the next:
[nice, but a few years late :) ideas deleted]

you are in fact wrong. You can either check the source in mm/swapfile.c
or, even easier, read the manual page for swapon(2) which explains the use
of priorities, which was in Linux since the early days of 1.3.6 (i.e. many
years ago). Basically, you can add swap devices with multiple priorities
and then a highest priority one is exhausted before using a lower-priority
one. If all areas are the same priority, then pages are allocated using
round robin algorithm, i.e. alternating between them.

Regards,
Tigra

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:19 EST