RE: A note on the 5.12-rc1 tag

From: David Laight
Date: Thu Mar 04 2021 - 11:58:28 EST


> On Thu, Mar 4, 2021 at 1:59 PM Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> > And, as far as I know, all the normal distributions set things up with
> > swap partitions, not files, because honestly, swapfiles tend to be
> > slower and have various other complexity issues.
>
> Looks like this has changed in at least Ubuntu: my desktop machine,
> which got Ubuntu 18.04LTS during initial installation, is using a (small)
> swapfile instead of a swap partition.

My older ubuntu (13.04) didn't have swap at all.
I had to add some when running multiple copies of the Altera
fpga software started causing grief.
That will be a file.

After all once you start swapping it is all horrid and slow.
Swap to file may be slower, but apart from dumping out inactive
pages you really don't want to be doing it - so it doesn't matter.

Historically swap was a partition and larger than physical memory.
This allows simple 'dump to swap' on panic (for many disk types).
But I've not seen that support in linux.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)