From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161291AbWGNSvB (ORCPT ); Fri, 14 Jul 2006 14:51:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161290AbWGNSvB (ORCPT ); Fri, 14 Jul 2006 14:51:01 -0400 Received: from gate.crashing.org ([63.228.1.57]:54666 "EHLO gate.crashing.org") by vger.kernel.org with ESMTP id S1422705AbWGNSvA (ORCPT ); Fri, 14 Jul 2006 14:51:00 -0400 Subject: Re: [PATCH] Use uname not sysctl to get the kernel revision From: Benjamin Herrenschmidt To: Steve Munroe Cc: Theodore Tso , libc-alpha@sourceware.org, linux-kernel@vger.kernel.org, Andi Kleen , akpm@osdl.org, Arjan van de Ven , Ulrich Drepper , "Eric W. Biederman" , "Randy.Dunlap" In-Reply-To: References: Content-Type: text/plain Date: Sat, 15 Jul 2006 04:49:55 +1000 Message-Id: <1152902996.23037.90.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > We will need an implementation that will fall back to sys_sysctl for older > kernels. This is already common practice in glibc. I don't really > understand the performance concern because it seems to me that > _is_smp_system() is only called once per process. > > But isn't this the kind of thing that the Aux Vector is for? I like vDSO > too, but I think it is best deployed for information of a more dynamic > nature and performance sensitive. For a simple "is_smp" kind of flag, I would tend to agree with the above... for more complex NUMA topology and/or cache characteristics, which is quite a bigger amount of information, I'm not sure it's worth copying all of that data on every process exec (and making the initial AT_ parsing slower). Especially since very few processes actually care about those. Ben.