The case of swap files with holes would be a nice thing to have.
It would effectivly give us a way to say "use the extra space on this
file system for swap" and at the same time the ability to set a limit
on how much space could be taken up by swap. For example you could
create a totally sparse 1G file at bootup, and use it as a swap file.
If the system needed swap it could grow the file, but you would know
that it would never grow beyond 1G.
I dont know if the kernel should punch holes back into the swap file when
it no longer needed the space. That would be nice, but it might be a lot
of work as I am not sure the VFS supports that. You could accomplish the
same thing by having a daemon that added a new swap file every hour and
did a swapoff & rm of the old file.
Thanks,
Jim
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/