From owner-freebsd-net@FreeBSD.ORG Wed Jan 24 06:51:10 2007 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C42616A400 for ; Wed, 24 Jan 2007 06:51:10 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id C81AA13C471 for ; Wed, 24 Jan 2007 06:51:09 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id A863F6E2E3; Wed, 24 Jan 2007 17:51:05 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 1172027417; Wed, 24 Jan 2007 17:51:06 +1100 (EST) Date: Wed, 24 Jan 2007 17:51:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Randall Stewart In-Reply-To: <45B6F81C.6050802@cisco.com> Message-ID: <20070124172119.P36500@delplex.bde.org> References: <45B679F3.3080407@cisco.com> <20070124150524.P16439@besplex.bde.org> <45B6F81C.6050802@cisco.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net Subject: Re: mbuf patch with sysctl suggestions too X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 06:51:10 -0000 On Wed, 24 Jan 2007, Randall Stewart wrote: > Bruce Evans wrote: >> It has a lot of style bugs (4 per line on so,me lines) (mainly weird >> whitespace starting with tab lossage). >> > That has to do with me using emacs I think.. I will be running that > section of code through the style9 (s9indent) stuff that George > gave me... so that should take care of the space <-> tab issues > and other stuff... I wouldn't trust an editor to get this right. indent(1) gets closer, but still gets so much wrong that every change that it wants to make must be reviewed manually. > I think Pyun is right though.. in adding the page size > calculation to the init code.. I forgot to mention the style bugs in the comment related to page sizes. IIRC, the comment has many hard-coded magic numbers which are only correct if the page size is 4K and the allocations start on page boundaries, but pages can be almost any size and are 8K on some supported arches, and I think allocations made by UMA are only aligned to a small power of 2. I think this allows a 9k buffer to be split across 4 4K-pages (e.g., 128+4096+4096+680) or across 3 8K-pages (128+8192+680). Hardware might not like this. Otherwise, non-page-aligned allocations should make the page size irrelevant. Bruce