[pups] Swap device in V6?
kwellsch at tampabay.rr.com
Tue Feb 27 03:51:49 AEST 2001
Roger Ivie wrote:
> Ian King said:
> > I've combed the docs and the code, and I can't find ANYthing about how =
> > swap space is assigned or designated. Does anyone have any hints? =
> > Thanks -- Ian=20
> Yeah, I figured this out a while ago. Unfortunately, I'm in the middle
> of changing employers so everything's in boxes at the moment.
> Basically, the swap space is hard-coded into the device drivers. If you
> take a look at, for example, the RK05 driver you'll see that one of the
> drives is smaller than the others. That extra space is the swap space.
> I forget how the rest of the system is informed of the swap space, but
> it's done in the disk driver sources IIRC.
I took a quick look at this this morning and as Roger says, the kernel
is built with a wired in swap. In the case of the kernel 'rkunix,' in
looking at usr/sys/run or something like that, I see they are wiring
the swap to be device major=0 and minor=0 which is the root RK05 drive.
Looking at the code it seems the first 4000 blocks are file system and
a following 782 (or something like that) are for swap.
The "ps" command source appears to be poking around /dev looking for a
block device that matches the kernel value for swapdev (or something like
that) and confirming it is a block device.
Yet I see I have /dev/rk0 mknod'ed 0/0 and it is a block device but "ps"
still gripes about "no swap device."
So I'm missing something I guess.
Received: (from major at localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id FAA53659
for pups-liszt; Tue, 27 Feb 2001 05:39:14 +1100 (EST)
(envelope-from owner-pups at minnie.cs.adfa.edu.au)
More information about the TUHS