[PATCH] swapon priority (-p) option

Francois Barel frabar666 at gmail.com
Sun May 18 14:45:59 PDT 2008


Hi,

Attached is a patch that adds support for the "-p" option in "swapon",
to specify the new device's swap priority.
This option is useful when you want your kernel to interleave swap
activity between several devices (similar to RAID0, for swap).


bloatcheck on x86 glibc/gcc-4 (custom config) with feature active:

function                                             old     new   delta
swap_on_off_main                                     155     227     +72
packed_usage                                       11808   11814      +6
swap_enable_disable                                   67      71      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 82/0)               Total: 82 bytes
   text    data     bss     dec     hex filename
1158041    2178   19318 1179537  11ff91 busybox_old
1158123    2178   19318 1179619  11ffe3 busybox_unstripped


With feature not active, 5 bytes are still added to swap_on_off_main.

Cheers,
Francois
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: busybox-swapon-pri.patch
Url: http://busybox.net/lists/busybox/attachments/20080518/1ddc8535/attachment.txt 


More information about the busybox mailing list