From owner-freebsd-arch Wed Feb 28 7:52:58 2001 Delivered-To: freebsd-arch@freebsd.org Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by hub.freebsd.org (Postfix) with ESMTP id 0F95E37B719 for ; Wed, 28 Feb 2001 07:52:54 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1) id 14Y8uK-000Pfk-0B; Wed, 28 Feb 2001 15:52:52 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id f1SFqq136492; Wed, 28 Feb 2001 15:52:52 GMT (envelope-from dfr@nlsystems.com) Date: Wed, 28 Feb 2001 15:52:52 +0000 (GMT) From: Doug Rabson To: Andrew Gallatin Cc: Subject: Re: Please review: moving vm_page_array[] In-Reply-To: <15005.6685.789581.544314@grasshopper.cs.duke.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 28 Feb 2001, Andrew Gallatin wrote: > > FreeBSD currently panic's at boot on alpha UP1x00s with a lot of > memory (> 512MB) with the message "isa_dmainit: unable to create dma > map" > > The UP1x00 is the only alpha platform to use bounce buffers, and it is > panicing because the contigmalloc in alloc_bounce_pages() is failing. > Here's why: > > The vm_page_array[] (and vm_page_buckets) are currently carved out of > the front of the largest chunk of physical memory. This isn't a > problem on a PC, because there is typically 636k in a smaller chunk > (starting at 4k) that the bounce buffers can be allocated from. There > is typically no usable smaller chunk on alphas; in fact, the UP1000 > family has only one chunk. Given that the vm_page_array[] entries for > an alpha with 1 GB of ram consumes 13MB of memory, we need to allocate > this structure at the end of memory, not at the start. > > The following patch moves vm_page_array[] and vm_page_buckets[] to the > end of memory. This fixes the UP1000 isa_dmainit panics & appears to > cause no harm on the other alphas and PCs I've tested it on. I'd > really appreciate it if somebody could review this, as I'd like to get > it committed & MFC'ed in time for 4.3 Sorry about the delay in looking at this - I've had other things distracting me. The patch looks correct to me. I'm not sure what would happen if the last chunk wasn't large enough for the various data structures but then the old code didn't cope with this situation either. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message