lkml.org 
[lkml]   [1998]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Multiple swap partition uglies (fwd)
On Mon, 25 May 1998, Riley Williams wrote:

> Hi Paul.
>
< big snip>

> Hang on - both partitions have been specified as "pri=1" there, and my
> understanding was that swap partitions have to have DIFFERENT
> priorities - also, on my system, all swap priorities are negative...

from man 2 swapon
PRIORITY
Each swap area has a priority, either high or low. The
default priority is low. Within the low-priority areas,
newer areas are even lower priority than older areas.

All priorities set with swapflags are high-priority,
higher than default. They may have any non-negative value
chosen by the caller. Higher numbers mean higher prior-
ity.

Swap pages are allocated from areas in priority order,
highest priority first. For areas with different priori-
ties, a higher-priority area is exhausted before using a
!! lower-priority area. If two or more areas have the same
!! priority, and it is the highest priority available, pages
!! are allocated on a round-robin basis between them.

As of Linux 1.3.6, the kernel usually follows these rules,
but there are exceptions.

nuff said?

and from man 8 swapon
-p priority
Specify priority for swapon. This option is only
available if swapon was compiled under and is used
under a 1.3.2 or later kernel. priority is a value
between 0 and 32767. See swapon(2) for a full
description of swap priorities. Add pri=value to
the option field of /etc/fstab for use with swapon
-a.

which _says_ the priorities are positive numbers. However, I've seen
posts with negative priorities mentioned, so I'm not really sure.

> That would tend to indicate a configuration error - especially since
> the system I run that has two swap partitions (with DIFFERENT priority
> levels) does NOT suffer from the problem, even though it otherwise
> matches the specification given in the original message...

What's wierd is that I don't seem to have any problems as long as the
swaps have different priorities (dosen't seem to matter which is higher).
Problem only seems to come up for priorities the same. When I know more,
I'll be posting back to linux-kernel.

Cheers

Paul

---------------------------------------------------------------------------

,---
Paul Wilkins | o o |
Internet Operations Manager ` \_/ ' Linux
TMP Worldwide /\___/\ The Choice of
paulw@tmpw.com.au |_/ . \_| A GNU Generation
http://www.monsterboard.com.au \_/___\_/
---------------------------------------------------------------------------


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.846 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site