[pups] Swap device in V6?
iking at microsoft.com
Tue Feb 27 04:27:12 AEST 2001
I, too, have /dev/rk0 mknod'ed as 0,0. Relaetd to this, ps does something
odd (at least to my experience) with the open() system call - it calls 'open
("/dev")', without a second argument for mode; that seems like a no-no in C,
but for C of this era I'm not sure. That call seems to succeed; it's a few
statements later where it fails with the "no swap device" console message.
But where cc seems to be failing (in /lib/c0), it is doing a fork(),
execve() and wait(), and if the system needs to swap to do that, not being
able to find swap space would sure bugger things up.
I'll examine my /dev/rk0 structure next.... -- Ian
From: Ken Wellsch [mailto:kwellsch at tampabay.rr.com]
Sent: Monday, February 26, 2001 9:52 AM
To: Roger Ivie
Cc: PUPS at minnie.cs.adfa.edu.au
Subject: Re: [pups] Swap device in V6?
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 GAA53963
for pups-liszt; Tue, 27 Feb 2001 06:08:50 +1100 (EST)
(envelope-from owner-pups at minnie.cs.adfa.edu.au)
More information about the TUHS