This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use uname not sysctl to get the kernel revision
- From: Steve Munroe <sjmunroe at us dot ibm dot com>
- To: Theodore Tso <tytso at mit dot edu>, libc-alpha at sourceware dot org, linux-kernel at vger dot kernel dot org
- Cc: Andi Kleen <ak at suse dot de>, akpm at osdl dot org, Arjan van de Ven <arjan at infradead dot org>, Ulrich Drepper <drepper at redhat dot com>, "Eric W. Biederman" <ebiederm at xmission dot com>, "Randy.Dunlap" <rdunlap at xenotime dot net>
- Date: Wed, 12 Jul 2006 18:44:33 -0500
- Subject: Re: [PATCH] Use uname not sysctl to get the kernel revision
Theodore Tso <tytso@mit.edu> wrote on 07/12/2006 06:24:14 PM:
> On Wed, Jul 12, 2006 at 11:42:47AM -0600, Eric W. Biederman wrote:
> > Unless a darn good reason for keeping it is found, sys_sysctl won't be
> > in the kernel several months from now. And uname is faster by a large
> > margin than /proc.
>
> Um, if glibc is using sys_sysctl, then that's a pretty good reason.
> Once we remove it from the kernel, then people will be forced to
> upgrade glibc's before they can install a newer kernel. Can we please
> give people some time for an version of glibc with this change to make
> it out to most deployed systems, first? It's really annoying when
> it's not possible to install a stock kernel.org kernel on a system,
> and often upgrading glibc is not a trivial thing to do on a
> distribution userspace, especially if there is a concern for ISV
> compatibility. (Especially if C++ code is involved, unfortunately.)
>
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.