Re: Swap support

Riley Williams
2002-04-22T22:23:29Z

Hi Harry.

>>>> Would you mind if I tweaked the config system to allow this to be
>>>> configured therein, making the entire configuration dependent on
>>>> the CONFIG_EXPERIMENTAL config variable?

>>> Yes make it dependent on CONFIG_EXPERIMENTAL, as for the
>>> configuration of the swap partition leave it as it is now,
>>> since it is only for developers at the moment...

>> No problem. There's two thing that strike me though:
>>
>> 1. Does it actually make sense to use a ramdisk as a swap drive?

> For now it does only for debuging. Later if and when we have
> ramdrives that use memory after 1MB (on 286) it will make sense for
> more than debuging....

Also if we have EMS cards that we support, they could be used for swap
as well as ramdrives.

>> 2. If we're using a hard drive partition as a swap partition,
>> doesn't the kernel already know the size of that partition?

> Yes it does and the swapper will use that info in the next versions.
> I just hardcoded in for now since the ramdisk driver does not inform
> about the size of the drive and I only use the ramdisk for debugging.

So what you're basically saying is that all storage device drivers need
to include a facility where they can be asked the size of the drive
they're controlling, if I'm understanding that right? After all, it's
not something that could safely be left to even the most experienced
system admin to specify, so there needs to be some means for the swap
system to ask the underlying device/file what its size is.

>> If (2) is true, then the extents field is not one needing
>> configuration anyway as we can just grab the value the kernel has
>> already determined earlier in the boot process. At least, I hope it
>> has, as it doesn't make sense for the swap code to be enabled prior
>> to our autoprobing for the hard drive partition sizes.

>>>> Also, does it use any particular format for the swap partition?

>>> There is no need to format the block device (partition) to be used...

>> True, but it misses what I was asking. Basically, are we emulating
>> the Linux swap code in this respect, in that we store a swap
>> signature at the start of the swap partition, or are we just using
>> the partition raw?

> We are using the partition _raw_. No format is needed(mkswap).

Similar to Linux's mkswap that just drops the signature at the start of
the relevant partition and exits, except our signature is 0 bytes long.

Best wishes from Riley.