I have seen this before ... the /tmp directory mounted on swap space. I am aware something similar can be done using tmpfs, but I don't think that what was being used. I too would like to mount /tmp onto my swap partition without using tmpfs but do not know how. My (layman's) understanding of tmpfs is that, by default, it uses half the RAM on your system. I also understand that I can be tweaked to use a greater or lesser amount. But can it be configured to use 0 (that is, zero) bytes of RAM but use only available swap partitions? I tried and it did not work for me. But then again, I know very little about this. Maybe some parameters were entered incorrectly. I like the idea of using swap for an OS temp dir but I do not want to allocate any RAM for this. Is this possible?
tmpfs will initially be allocated half the size of RAM, but is is backed by swap space and will swap if memory is low, So it doesn't prevent the system from using all available RAM for other purposes.
I'd recommend simply using tmpfs rather trying something obscure .