From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 7 23:21:06 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 4BF8F1065673; Sat, 7 Aug 2010 23:21:06 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9948FC23; Sat, 7 Aug 2010 23:21:05 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 232351FFC33; Sat, 7 Aug 2010 23:21:05 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 07D1684525; Sun, 8 Aug 2010 01:21:05 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <86fwyq8rsc.fsf@ds4.des.no> <86d3tujh72.fsf@ds4.des.no> Date: Sun, 08 Aug 2010 01:21:04 +0200 In-Reply-To: (Garrett Cooper's message of "Sat, 7 Aug 2010 15:19:37 -0700") Message-ID: <864of680wv.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 23:21:06 -0000 Garrett Cooper writes: > Dag-Erling Sm=C3=B8rgrav 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 Karlsruh= e. > > 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 --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no