Subject: Re: USB reserve memory patch
To: Frank van der Linden <fvdl@NetBSD.org>
From: Jukka Marin <jmarin@embedtronics.fi>
List: port-i386
Date: 11/07/2004 13:24:18
On Mon, Oct 11, 2004 at 11:21:04PM +0200, Frank van der Linden wrote:
> I cooked up a patch that implements a workaround for runtime attachment
> of USB devices that need more than one page of contiguous memory, and
> have problems because memory is too fragmented at that point.
>
> The workaround is to have the host controller (ohci, uhci or ehci) set
> aside some contiguous memory at bootup, which is used should a USB
> allocation request failed later.
>
> The chunk of memory reserved is set via the USB_MEM_RESERVE option.
> Default is 256k.
Is it possible that this patch could prevent adding a large swap
partition? I installed the patch to a 2.0_RC4 kernel, rebooted - and
ended up with no swap space. I ran "swapctl -A" and it sait it could
not get memory. My swap partition size was 16 GB. I have never seen
this before.
I then resized the swap partition to 5 GB and rebooted - and everything
works now. I'll try 8 GB next.
BTW, this machine has 1 GB of physical memory.
-jm