INVARIANTS (was Re: RELENG_4 -> 5 -> 6: significant performance regression)

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Tue May 16 08:01:08 PDT 2006


Hello!

On Sat, 13 May 2006, Matthew D. Fuller wrote:
> On Sat, May 13, 2006 at 11:58:26AM -0400 I heard the voice of
> Kris Kennaway, and lo! it spake thus:
>>
>> FYI, INVARIANTS adds checks but does not (is not supposed to) divert
>> code paths.
>
> It does at least in UMA; it does a lot of bzero()/NULL'ing out of
> memory, which might hide later uninitialized-use bugs that could bite
> you without it (and, of course, probably burns a fair chunk of CPU to
> do it ;).  I know I've heard other cases over the past 5 years or so;
> that's the only one I've heard recently or can check, but I wouldn't
> be too surprised if there were others.

   This is exactly the point of my suggestion: use separate option (e.g.,
INVARIANTS_EXTENDED) for this additional bzero()/NULL'ing and other
performance-expensive checks, and leave only simple asserts under
basic INVARIANTS options. IMHO this will encourage (or, at least,
not discourage) use of INVARIANTS-enabled kernels in production
conditions which for sure will help to analyze latent, heavy load-specific,
bugs.

> Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
> Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
>           On the Internet, nobody can hear you scream.

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the freebsd-stable mailing list