I know what this command does. It sets up swap area on a device or in a file.
The device being a partition, and file being a simple file.
But I want to know what it does internally on the disk.
Correct me here if I am wrong, Swap is slower than RAM, but faster than simple Disk for operations.
This is my question.
What changes does mkswap makes on disk? I mean, the swap area is still on disk (be it a partition or a file), right?, then how come it works faster than rest of the disk? It must be doing some changes on the disk? What are these changes?
EDIT - It is in reference to this video, https://www.youtube.com/watch?v=uxiis-K6v7w
here it is being told that data accessed frequently is moved to the outer area of the disk. So, I guess mkswap might move the swap partition/file to some outer area of the disk.