From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 7 22:19:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB2801065673; Sat, 7 Aug 2010 22:19:38 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 815998FC16; Sat, 7 Aug 2010 22:19:38 +0000 (UTC) Received: by iwn10 with SMTP id 10so3180730iwn.13 for ; Sat, 07 Aug 2010 15:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=O/8RQAHlSiS7RzrtFhL31uIQd6T6OT5kVl+G7Ih4aVY=; b=azXo0AD91cGS8cnmi8cSyvC2qTb7eQQM6VhlM7PQvJevFucq2yknYwsN7DCZcfWHXS juBBnZ3wGg7wWdUv1nIa/p5DhOvMTeD5rvJozwgqoa63RjhvUDeHLFE7/Jgd9nmudNkq uD+nAScph+cLsHhgmgV3L4volvvIPjBMu3TBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=EAInWvozrq5d/fGZnFhDL1eQP52fk7ivg7Nco1FZZwzgHRgcmJAWbGAlRz5rdI7r02 NAHWMhwwPZwgYb2tZ0p6xQKHPskYXNAntpff35o+pDTuOJre78oVficdi3HNB99et5H1 ARiScWE++KAfvj5i57otaaB5V25DBEdB5krvM= MIME-Version: 1.0 Received: by 10.231.184.71 with SMTP id cj7mr16143893ibb.159.1281219577851; Sat, 07 Aug 2010 15:19:37 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.173.133 with HTTP; Sat, 7 Aug 2010 15:19:37 -0700 (PDT) In-Reply-To: <86d3tujh72.fsf@ds4.des.no> References: <86fwyq8rsc.fsf@ds4.des.no> <86d3tujh72.fsf@ds4.des.no> Date: Sat, 7 Aug 2010 15:19:37 -0700 X-Google-Sender-Auth: 6Qj-W3aY8vxdSLxmGKx_zg-7sEo Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: Why is TUNABLE_INT discouraged? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2010 22:19:38 -0000 2010/8/7 Dag-Erling Sm=F8rgrav : > Ivan Voras writes: >> Ok, but still - if the underlying value really is declared as "int", >> doesn't it make perfect sense to have something like TUNABLE_INT for it? > > Perhaps. =A0I don't remember all the details; I can't find a discussion i= n > 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 (feel free to ignore the second i386 value for _limits.h... it was a hack for gcc according to the comment)? $ egrep -nr '#define[[:space:]]+__LONG_MAX' amd64/include/ i386/include/ | grep -v svn amd64/include/_limits.h:63:#define __LONG_MAX 0x7fffffffffffffffL /* max for a long */ i386/include/_limits.h:65:#define __LONG_MAX 0x7fffffffffffffffL i386/include/_limits.h:69:#define __LONG_MAX 0x7fffffffL /* max value for a long */ $ egrep -nr '#define[[:space:]]+__INT_MAX' amd64/include/ i386/include/ | grep -v svn amd64/include/_limits.h:59:#define __INT_MAX 0x7fffffff /* max value for an int */ i386/include/_limits.h:59:#define __INT_MAX 0x7fffffff /* max value for an int */ I was originally asking because I didn't have the background to know why a TUNABLE_UINT set of macros didn't exist. Thanks, -Garrett