Re: swap space: an idea. Please comment.

Thomas Schoebel-Theuer (schoebel@informatik.uni-stuttgart.de)
4 Mar 1997 14:54:19 GMT


I got an answer to my last post by email, but was not able to reply
to the mail address corey@argon.neotech.org (me), because our nameserver says:
*** ifi.informatik.uni-stuttgart.de can't find argon.neotech.org: Non-existent host/domain
So I post it here.

> : If you like to implement it, my advice is not to fundamentally change
> : anything that is available today. I.e., don't introduce a new file system
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : with reserved space for swap, but use the current swapfile mechanism.
> : Is is slower than directly swapping to partitions, but it can be made
> : dynamic in contrast to the latter.
>
> what a interesting idea! what if we allowed swap memory blocks to be written
> to unused blocks of e2fs? it would eliminate the "defragment" problem when
> shrinking the swapfile.
>
> Corey
>

Corey,

I don't get your point.

What does using "unused" blocks mean? AFAIK, these blocks are then used by
the swapspace und must not be used for normal files any more. Right?
So you have the effort to do a space reservation (and also for freeing),
why not use an already exisiting mechanism, e.g. a swapfile?

The only difference I could imagine is that such a "swapspace" may contain
holes. But that can also be achieved with "sparse files", a concept
that should be already implemented in ext2. I don't know any details,
whether an interface exists to create "holes", but wouldn't that
solve your problem?

-- Thomas