[maemo-users] Swap partition priority

From: Douglas Cook main at douglasjcook.com
Date: Tue Jul 6 12:53:03 EEST 2010
Hey all,

Figured this would be the best place to ask this kind of question.

Has anyone had any experience with running a swap partition on their
sd card at the same priority as the internal emmc swap?

I've modified /etc/event.d/rcS-late and modified the awk fstab
generator script to generate the following at the end of /etc/fstab

/dev/mmcblk0p3 none swap sw,pri=0 0 0
/dev/mmcblk1p2 none swap sw,pri=0 0 0

Where /dev/mmcblk1p2 is my sd card swap partition.

Catting /proc/swaps shows /dev/mmcblk1p2 with 0 bytes used and a
priority of -2 and the internal emmc /dev/mmcblk0p3 with memory in
swap and a priority of -1.

The device is correct as it appears in /proc/swaps and in the output of free.

It seems that swapon -a doesnt respect the priority settings in fstab.
I've also double checked this via swapoff -a && swapon -a. Since there
is no swapon -p (iirc) for priority in the busybox's binary I'm at a
loss as for what to do next.

I'm looking to use both swaps with the same priority to use both at
the same time and relieve IO pressure in a high swapping situation.

Is there any way to do this with Maemo 5 on the n900?

Douglas Cook
More information about the maemo-users mailing list