From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Daiker Date: Wed, 28 Jun 2006 16:11:23 +0000 Subject: Re: [PATCH] ia64: change usermode HZ to 250 Message-Id: <44A2AA2B.3090101@osdl.org> List-Id: References: <20060627220139.3168.69409.sendpatchset@tomahawk.engr.sgi.com> <1151483994.3153.5.camel@laptopd505.fenrus.org> <005e01c69ac9$a55e1bf0$6f00a8c0@comcast.net> <1151511668.15166.34.camel@localhost.localdomain> In-Reply-To: <1151511668.15166.34.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alan Cox Cc: John Hawkes , Arjan van de Ven , Tony Luck , Andrew Morton , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, Jack Steiner , Dan Higgins , Jeremy Higdon Alan Cox wrote: > Ar Mer, 2006-06-28 am 08:43 -0700, ysgrifennodd John Hawkes: > >>> #define HZ sysconf(_SC_CLK_TCK) >>> >> That did occur to me. It obviously does get the correct value. The downside >> is that one of those crufty apps that thinks it is using "HZ" as a constant >> will instead be invoking a more costly syscall. Should we care about the >> resulting performance impact? >> > > Given that HZ can be cached by glibc the performance impact is minimal > for most cases. The bigger problem will be code that does things with HZ > that only work on compile time evaluation. At least for those you'll > break at compile time. > > Either way its kind of irrelevant, the ABI set HZ. Its done, there are > plenty of ways to change the kernel HZ without confusing userspace. > > Alan > > Alan, I agree with Arjan's solution as well. From a very novice point of view, it makes sense to #define HZ as a syscall (which it technically should be anyway, right?). Any performance hit isn't our problem... people should have been using the syscall to begin with... we're just forcing it on them this way! :-) That's my $0.02 John Daiker