2 ms·
If by a file with holes you mean a file that has unallocated blocks (a sparse file, which is quite rare) such a file cannot be used as a swap file, the kernel w
by tinus_hn 10y ago
If by a file with holes you mean a file that has unallocated blocks (a sparse file, which is quite rare) such a file cannot be used as a swap file, the kernel will refuse it.
If you mean a fragmented file, it works but it is slightly slower but not by a relevant amount. The kernel just remembers which blocks are in the file and uses these.
As the swap file typically is created during installation it is unlikely to be fragmented anyway.