From owner-freebsd-current@FreeBSD.ORG Wed Jul 18 18:30:45 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58E6916A401 for ; Wed, 18 Jul 2007 18:30:45 +0000 (UTC) (envelope-from davidch@broadcom.com) Received: from mms1.broadcom.com (mms1.broadcom.com [216.31.210.17]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF9A13C471 for ; Wed, 18 Jul 2007 18:30:44 +0000 (UTC) (envelope-from davidch@broadcom.com) Received: from [10.10.64.154] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.1)); Wed, 18 Jul 2007 11:30:36 -0700 X-Server-Uuid: 6B5CFB92-F616-4477-B110-55F967A57302 Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id 560292AF; Wed, 18 Jul 2007 11:30:36 -0700 (PDT) Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.10.64.221]) by mail-irva-10.broadcom.com (Postfix) with ESMTP id 41D3C2AE; Wed, 18 Jul 2007 11:30:36 -0700 (PDT) Received: from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com [10.10.64.146]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP id FME57023; Wed, 18 Jul 2007 11:30:35 -0700 (PDT) Received: from NT-IRVA-0750.brcm.ad.broadcom.com ( nt-irva-0750.brcm.ad.broadcom.com [10.8.194.64]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id D667669CA3; Wed, 18 Jul 2007 11:30:35 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Wed, 18 Jul 2007 11:30:33 -0700 Message-ID: <09BFF2FA5EAB4A45B6655E151BBDD9030483F40F@NT-IRVA-0750.brcm.ad.broadcom.com> In-Reply-To: <20070718004530.GV1221@funkthat.com> Thread-Topic: Getting/Forcing Greater than 4KB Buffer Allocations Thread-Index: AcfI1Prfzr1DT2RrSKeAG3+Tcp7VdAAlDzeg References: <09BFF2FA5EAB4A45B6655E151BBDD9030483F161@NT-IRVA-0750.brcm.ad.broadcom.com> <20070718004530.GV1221@funkthat.com> From: "David Christensen" To: "John-Mark Gurney" X-WSS-ID: 6A8083C61S87404455-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: current@freebsd.org Subject: RE: Getting/Forcing Greater than 4KB Buffer Allocations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 18:30:45 -0000 > > I'm investigating a problem with my bce driver which occurs=20 > when I ask > > for a jumbo > > mbuf cluster (through m_cljget()). When I map the memory for DMA I > > normally=20 > > get 3 memory segments (4KB + 4KB + 1KB) on my system, but on another > > user's=20 > > system he's seeing 2 memory segments (8KB + 1KB). Is there a > > configuration > > option that allows this or some other tuning variable involved? The > > system is a=20 > > Xeon dual-core processor and has 8GB of RAM, running an=20 > AMD64 version of > > the kernel. >=20 > Is this an issue? If it is, you need to fix your bus_dma_tag_create > calls to set the segment size and count properly. bus_dma will get > you exactly what you ask for, and your driver needs to tell bus_dma > what it can and cannot handle. >=20 I believe my code can handle this correctly but you never know for sure until you're able to test it. Are you saying that I can tell bus_dma=20 that I can only handle 2 segments and essentially force this scenario? Could I force more segments to test a maximum value too? Dave