3 ms·
The swap file code does not go through the filesystem. It's the exact same code which is used for a swap partition or a swap file, and it writes directly to the
by cesarb 6y ago
The swap file code does not go through the filesystem. It's the exact same code which is used for a swap partition or a swap file, and it writes directly to the block device (the partition). The main difference is that, if you have a swap file, the "swapon" call asks the filesystem to tell it which ranges in the block device contain the swap, instead of using the whole block device.
- bombcar 6y agoI did not know this - it makes sense, but it certainly a surprise.