Subject: Re: swap device, pageout on pmax broken?
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Per Fogelstrom <pefo@enea.se>
List: port-pmax
Date: 08/02/1995 14:04:18
> 
> 
> pefo@enea.se (Per Fogelstrom) writes:
> >And will not work before the line 
> >        dev_t swapdev = makedev(1, 0);
> >in conf.c is fixed so it points at the swap pseudo device instead
> >of a dummy (nodev).
> 
> Pageout seems to be thoroughly broken on pmaxes.  The cdevsw says:
> 
> struct cdevsw	cdevsw[] =
> {
> 	cdev_cn_init(1,cn),		/* 0: virtual console */
> 	cdev_swap_init(1,sw),		/* 1: /dev/drum (swap pseudo-device) */
> 
>    /* ... */
> }
> 
> so makedev(1, 0) isn't _entirely_ wrong.
> 
> Is swapdev meant to be the *block* device or the *raw* device?
> Do they have to be the same major number for the swap device?
> I tried changing the "(1, 0)" to (4, 0)" and ran enough copies
> of a 16Mbyte page-dirtier to exhaust memory, but I didn't
> notice any difference between the two majors for swapdev.
> 
Might be. But _something_ is wrong. On my system the swapper uses
the block device for swapping. And it might be due to something
wrong in the initialization code. The device given by swapdev
is set up as a VBLK device. So letting swapdev point at a VCHR dev
make no sense (IMHO). (This is analoguous with how the *root* device
is set up. It is also set up as a VBLK device).