Subject: Re: DMA
To: None <port-sun3@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sun3
Date: 01/15/1996 07:42:15
>> I think I know what happened here: swapping uses _all_ of the swap
>> partition, [...]. So when you put swap at offset 0, you ended up
>> swapping all over your disk label (and possibly boot blocks,
>> depending).
*blush* I spoke too quickly. It turns out there's code in
vm/vm_swap.c specifically designed to avoid using the first few blocks
of a pack:
if (vsbase == 0) {
/*
* First of all chunks... initialize the swapmap.
* Don't use the first cluster of the device
* in case it starts with a label or boot block.
*/
rminit(swapmap, blk - ctod(CLSIZE),
vsbase + ctod(CLSIZE), "swap", nswapmap);
} else if (dvbase == 0) {
/*
* Don't use the first cluster of the device
* in case it starts with a label or boot block.
*/
rmfree(swapmap, blk - ctod(CLSIZE),
vsbase + ctod(CLSIZE));
} else
rmfree(swapmap, blk, vsbase);
der Mouse
mouse@collatz.mcrcim.mcgill.edu