Help with swapon(8)

Joseph Thomas jpt at uf.msc.umn.edu
Mon Mar 6 11:52:45 AEST 1989


We had a similar desire to use a "swap generic" kernel and add swap areas
based on the system/disk we happend to be running off of. It can be done,
assuming you have source. I suspect that you could patch /vmunix to do
something similar, but that would be much harder. 

What happens is that the kernel builds a table of swap devices at compile
time. When the system is booted, it reads the geometry of these devices
and fills in the block counts. You can't add devies to the generic swap
kernel because it hits the end of the device table.

We "drove around" this problem by rewritting the code to treat the end of
table value differently. The compile phase now leaves all slots available
for swapping ( instead of one "generic" one ) and assumes a very large
maximum number of swapping blocks. [ As I recall, there was also a bug in
swapon which set the user proc error code in the wrong place, which caused
funny errors to come back. ]

An Aside:

What's the general story on posting kernel diffs ?? [ I would assume that
if someone were to send me a copy of their source license, I could then
send back the complete file ??? ]


Joseph Thomas
Minnesota Supercomputer Center
jpt at msc.umn.edu
612/626-1888



More information about the Comp.sys.sun mailing list