Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2007 07:52:16 -0500
From:      Randall Stewart <rrs@cisco.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-net <freebsd-net@FreeBSD.org>
Subject:   Re: mbuf patch with sysctl suggestions too
Message-ID:  <45B75680.9030809@cisco.com>
In-Reply-To: <20070124172119.P36500@delplex.bde.org>
References:  <45B679F3.3080407@cisco.com> <20070124150524.P16439@besplex.bde.org> <45B6F81C.6050802@cisco.com> <20070124172119.P36500@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <or> 803-317-4952 (cell)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45B75680.9030809>