Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 17:52:09 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: pahole - Finding holes in kernel structs
Message-ID:  <alpine.BSF.2.00.0902121751120.2205@fledge.watson.org>
In-Reply-To: <20090212163344.GR79178@hoeg.nl>
References:  <d41814900902120608i4b54c86fp9f565bbeead5a476@mail.gmail.com> <200902121717.47841.max@love2party.net> <20090212163344.GR79178@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Feb 2009, Ed Schouten wrote:

> * Max Laier <max@love2party.net> wrote:
>> So to answer your first question, submitting 101 patches to rearrange 101
>> structs is certainly a wasted effort.  However, if you take a good look at the
>> 2000 holes, identify an interesting subset and submit a patch to fix that
>> subset ... that would be a worthwhile effort ... IMHO.
>
> I guess it's also a wasted effort to reduce struct tty from 8xx to 7xx 
> bytes, because it still allocates 1024 bytes of memory using malloc(9). I 
> guess we should mainly focus on structures that are allocated using uma(9) 
> or are slightly bigger than 2^n.

There are two things we can do: we can allocate using a specific UMA zone, but 
we could also retune our malloc buckets to waste less space while avoiding 
commiting memory to specific types where it's unhelpful (when UMA is used, we 
populate caches of pre-initialized instances, so we don't want to use UMA for 
things allocated, say, six times).

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0902121751120.2205>