Subject: swap generic precludes multiple swapon's ?
To: None <netbsd-help@NetBSD.ORG>
From: Tom Pavel <PAVEL@SLAC.Stanford.EDU>
List: netbsd-help
Date: 11/02/1995 22:13:09
I picked up another disk drive to play with, and I thought I would try
a "swapon /dev/sd0b" in addition to the usual wd1b.  When I do this, I
get "swapon: /dev/sd0b: device not configured".  I uses a line like:
	config         netbsd  swap generic
in my kernel config (and this is i386, BTW).

I poked around in vm_swap.c, and it looks like I get EINVAL because
sd0b is not in the swdevt[] array.  Then I looked in
/sys/arch/i386/i386/swapgeneric.c and see that only swdevt[0] is ever
initialized and it is always initialized to "root" + 1.

So, my question is whether this is a bug or a feature?  I like the
principle of "swap generic" because then I can move my partitions
around without worrying about recompiling a kernel, but I would like
to interleave my swapping to multiple disk spindles if I have them.
Is there something I'm not understanding about "swap generic"?  [For
example, I had a bout earlier when I deleted "options GENERIC" from a
"swap generic" config and couldn't figure out why things wouldn't
boot.  I never did figure out why that -DGENERIC couldn't have been
generated automatically...]


Tom Pavel

Stanford Linear Accelerator Center
pavel@slac.stanford.edu                 http://www.slac.stanford.edu/~pavel/