SWAP and flash

links

http://redmine.digitalstrom.org/projects/dss/wiki/Dss11_swap_image
http://redmine.digitalstrom.org/projects/dss/wiki/Dss11_partitioning#From-Linux

swapfile on ubifs

while the swapfile is on a file system, linux requires access to the underlying blocks, which can change on the fly in ubifs
it wants to know which blocks are contiguous to each other on the underlying file system, which ubi can not provide

http://lxr.free-electrons.com/source/mm/swapfile.c#L1707
http://lxr.free-electrons.com/source/mm/swapfile.c?v=3.0#L1395 <current revision>
http://superuser.com/questions/497249/why-using-swap-file-over-a-smb-nfs-mounted-filesystem-is-not-possible-in-linux
http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

# swapon /swapfile
swapon: swapfile has holes

mtdswap

http://redmine.digitalstrom.org/issues/5696#note-10

on devel feed:

opkg install swapconfig

For other feeds, but with compatible kernel:

  • opkg install kernel-module-mtdswap_...ipk
  • modprobe mtdswap, verify module is compatible, check for kernel oops
  • opkg install swapconfig_..ipk