Lothar reacted to Igor in how to set up swap partition
Yes, this how-to is O.K.
There is also one main fine tuning parameter to mention - called swappiness (/etc/sysctl.conf)
Our images has only 128Mb swap for "just in case" since vm.swappiness=0 ... "it's not used unless really urgent". We run system from SD by default and you really don't want to swap to SD card.