Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Aug 2010 15:40:35 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Garrett Cooper <gcooper@FreeBSD.org>
Cc:        hackers@freebsd.org
Subject:   Re: Why is TUNABLE_INT discouraged?
Message-ID:  <86fwyq8rsc.fsf@ds4.des.no>
In-Reply-To: <AANLkTinKaiGFhKRgqQ%2BFjm=02VfWCxULe0a68y-PkJx6@mail.gmail.com> (Garrett Cooper's message of "Fri, 6 Aug 2010 23:48:19 -0700")
References:  <AANLkTinKaiGFhKRgqQ%2BFjm=02VfWCxULe0a68y-PkJx6@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Cooper <gcooper@FreeBSD.org> writes:
>    I found the commit where it was made (by des@ -- cvs revision
> 1.120), but unfortunately I lack the context as to why that suggestion
> is made; the commit isn't very explicit as to why integers tunables
> should be discouraged

You're supposed to use TUNABLE_LONG or TUNABLE_ULONG instead.  From
digging in the -current archives, it seems that the motivation was a bug
that resulted from using a TUNABLE_INT for a value that was actually an
address.  It was doubly broken: first because it was too small on 64-bit
systems, and second because it was signed.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fwyq8rsc.fsf>