From owner-freebsd-amd64@FreeBSD.ORG Thu Feb 9 03:56:37 2006 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E99316A420 for ; Thu, 9 Feb 2006 03:56:37 +0000 (GMT) (envelope-from andrew@areilly.bpc-users.org) Received: from omta04sl.mx.bigpond.com (omta04sl.mx.bigpond.com [144.140.93.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA14343D4C for ; Thu, 9 Feb 2006 03:56:35 +0000 (GMT) (envelope-from andrew@areilly.bpc-users.org) Received: from areilly.bpc-users.org ([141.168.4.160]) by omta04sl.mx.bigpond.com with ESMTP id <20060209035634.TUQV10380.omta04sl.mx.bigpond.com@areilly.bpc-users.org> for ; Thu, 9 Feb 2006 03:56:34 +0000 Received: (qmail 2581 invoked by uid 501); 9 Feb 2006 03:57:00 -0000 Date: Thu, 9 Feb 2006 14:56:59 +1100 From: Andrew Reilly To: freebsd-amd64@freebsd.org Message-ID: <20060209035659.GA2377@gurney.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: contigmalloc problem in SMP X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2006 03:56:37 -0000 I reported, earlier, that I wasn't able to get the amd64 version of the (closed source) 4front-tech OSS driver to start: it was unable to allocate some contiguous memory (48k or so, at the time). I've been in e-mail contact with one of their developers, and he has released a new version of the driver that doesn't try to allocate so much memory (now about 28k) for me to try. This didn't work either. However: I've just tried re-booting with kern.smp.disabled="1" in /boot/loader.conf, and lo: it works. So: why might contigmalloc() be failing, in a two-processor situation? (Sorry, uname -a: FreeBSD duncan.reilly.home 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Thu Feb 2 16:39:13 EST 2006 root@duncan.reilly.home:/usr/obj/usr/src/sys/DUNCAN amd64 ) Further details: unlike most other uses of contigmalloc() that I've seen in the tree (which use PAGE_SIZE alignment), this particular sound card needs a 64k-aligned buffer, and (with a bit of disassembly) that's what the oss driver appears to be asking for. All of the other arguments look the same. Oh: while I was looking at /src/sys/vm/vm_contig.c to see if I could see any obvious causes, I noticed that there's a sysctl knob: vm.old_contigmalloc, which is defaulting to 0. I frobbed it to 1 (in loader.conf, and rebooted), and that didn't help (in two-processor SMP). Any thoughts on what new vs old contigmalloc entails? Cheers, -- Andrew