From owner-freebsd-net@FreeBSD.ORG Wed Jan 24 12:52:53 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 C700E16A412 for ; Wed, 24 Jan 2007 12:52:53 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by mx1.freebsd.org (Postfix) with ESMTP id A12F113C46A for ; Wed, 24 Jan 2007 12:52:53 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-4.cisco.com ([171.71.179.196]) by sj-iport-5.cisco.com with ESMTP; 24 Jan 2007 04:52:53 -0800 Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-4.cisco.com (8.12.11/8.12.11) with ESMTP id l0OCqpP6028441; Wed, 24 Jan 2007 04:52:51 -0800 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id l0OCqoUw004494; Wed, 24 Jan 2007 04:52:51 -0800 (PST) Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 24 Jan 2007 04:52:50 -0800 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 24 Jan 2007 04:52:50 -0800 Message-ID: <45B75680.9030809@cisco.com> Date: Wed, 24 Jan 2007 07:52:16 -0500 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061029 FreeBSD/i386 SeaMonkey/1.0.6 MIME-Version: 1.0 To: Bruce Evans References: <45B679F3.3080407@cisco.com> <20070124150524.P16439@besplex.bde.org> <45B6F81C.6050802@cisco.com> <20070124172119.P36500@delplex.bde.org> In-Reply-To: <20070124172119.P36500@delplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Jan 2007 12:52:50.0286 (UTC) FILETIME=[8E0860E0:01C73FB6] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=1887; t=1169643171; x=1170507171; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20mbuf=20patch=20with=20sysctl=20suggestions=20too |Sender:=20; bh=0+W4qlBZUMkuCblT0GVZIZI+KWN8O+568r7GX63u6MA=; b=n4I8azR1za2ftPYxjBXDFyHtN8js5ek79RRKPJ8ApnJbp/kEAypa9JdXWSQ3S/ZnxDVDvpLS xeVU7Blasc5BFOR6pf2clDGfpL9QUMwgUyUb/F1kMUf5fGosKXiPcQ7A; Authentication-Results: sj-dkim-4; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim4002 verified; ); 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 12:52:53 -0000 Bruce Evans wrote: > 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. Hmm.. the one thing I thought of was to use the uk_ppera to do the calculation (besides what Pyun had mentioned). But I was concerned about using an internal Keg variable within another subsystem.... maybe if we made a access function... but Andre has asked to wait on this .. he has another idea.. so no hurry... its been "unlimited" this long... we can wait until Andre comes up with a better idea :-) R > > Bruce > -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)