Insures zram swap is higher priority than any swap added by block-mount; which is not the case if zram swap is restarted for any reason (e.g., /etc/init.d/zram restart).
v2 - Default CONFIG_FEATURE_SWAPON_PRI to 'y' Unfortunately, this adds an additional ~2.1K to the size of busybox. Signed-off-by: Nathan Hintz <nlhi...@hotmail.com> Index: package/zram-swap/files/zram.init =================================================================== --- package/zram-swap/files/zram.init (revision 35146) +++ package/zram-swap/files/zram.init (working copy) @@ -100,7 +100,7 @@ zram_reset "$zram_dev" "enforcing defaults" echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename $zram_dev )/disksize" mkswap "$zram_dev" - swapon "$zram_dev" + swapon -p 0 "$zram_dev" } done } Index: package/busybox/config/util-linux/Config.in =================================================================== --- package/busybox/config/util-linux/Config.in (revision 35146) +++ package/busybox/config/util-linux/Config.in (working copy) @@ -664,7 +664,7 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI bool "Support priority option -p" - default n + default y depends on BUSYBOX_CONFIG_SWAPONOFF help Enable support for setting swap device priority in swapon. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel