Why is TUNABLE_INT discouraged?

Dag-Erling Smørgrav des at des.no
Sat Aug 7 23:21:06 UTC 2010


Garrett Cooper <gcooper at FreeBSD.org> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > Perhaps.  I don't remember all the details; I can't find a discussion in
> > the list archives (other than me announcing the change in response to a
> > bug report), but there must have been one, either on IRC or in Karlsruhe.
> > In any case, I never removed TUNABLE_INT(), so...
> It does matter for integers on 64-bit vs 32-bit architectures though,
> right

Not sure what you mean.  The original issue was that someone had used
TUNABLE_INT() for something that was actually a memory address.  I
changed it to TUNABLE_ULONG().  Of course, if your tunable is a boolean
value or something like maxprocs, an int is fine - but so is a long.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list