From owner-freebsd-current@FreeBSD.ORG Wed Jul 18 02:18:48 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 30FC116A401 for ; Wed, 18 Jul 2007 02:18:48 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.freebsd.org (Postfix) with ESMTP id DD33B13C4B2 for ; Wed, 18 Jul 2007 02:18:47 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so30688nzf for ; Tue, 17 Jul 2007 19:18:47 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=PlGBKiDxSBYvrcYRJt/khq/2zrbVagfzSbK5mk4xAGg1P503foORBRfwYr/3MsUkK9HU3N52zqq30xqt+W5h2UUp1f/UtAKPkXZJAS2T0qd2antiArCepGUS3Ot4ldSY44HypTBFZgkKKDd98c4DC4hU0GBN9GsKXL1SRYz1TL4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=KX7XrGEam/b8KftpAeVPGlZNtY+E466CrUWwMScIV9xq9B6O7kqgi0arKw01WOoHizgKhT49IhtqkRvZ6aNWllL4iBn2QR/D/omZiKHsUvXQjWwSSe73PQ1vMFjcMOuhq0UA2+EnFtDERsIy/3UStJPQBzWsYugLWRJW19qRYzI= Received: by 10.115.16.1 with SMTP id t1mr983592wai.1184725126203; Tue, 17 Jul 2007 19:18:46 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id l23sm499532waf.2007.07.17.19.18.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2007 19:18:45 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l6I2IeAV038434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Jul 2007 11:18:40 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l6I2IdBH038433; Wed, 18 Jul 2007 11:18:39 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 18 Jul 2007 11:18:39 +0900 From: Pyun YongHyeon To: David Christensen Message-ID: <20070718021839.GA37935@cdnetworks.co.kr> References: <09BFF2FA5EAB4A45B6655E151BBDD9030483F161@NT-IRVA-0750.brcm.ad.broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09BFF2FA5EAB4A45B6655E151BBDD9030483F161@NT-IRVA-0750.brcm.ad.broadcom.com> User-Agent: Mutt/1.4.2.1i 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 Reply-To: pyunyh@gmail.com 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 02:18:48 -0000 On Tue, Jul 17, 2007 at 04:54:31PM -0700, David Christensen wrote: > I'm investigating a problem with my bce driver which occurs when I ask > for a jumbo > mbuf cluster (through m_cljget()). When I map the memory for DMA I > normally > get 3 memory segments (4KB + 4KB + 1KB) on my system, but on another > user's > 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 > Xeon dual-core processor and has 8GB of RAM, running an AMD64 version of > the kernel. > I've briefly looked over bus_dma usage on bce(4). It seems that you told bus_dma the the dma map could be made up of BCE_MAX_SEGMENTS segments, where a dma segment could be MJUM9BYTES bytes. If you want just two segments you may have to use 2 instead of BCE_MAX_SEGMENTS. If the hardware can support up to BCE_MAX_SEGMENTS dma segments on Rx descriptors you should be prepared to handle that number of dma segments too(e.g. You don't know how may dma segments would be returned by bus_dma, you just know the upper bound as you specified in bus_dma_tag_create()). If the hardware can handle just up to 4KB for a dma segment you should tell bus_dma the restriction of the dma segment. If you have to get a single dma segment that covers MJUM9BYTES bytes due to the limitation of the hardware you may have to use local allocator. -- Regards, Pyun YongHyeon