Re: [PATCH 22/23] sysctl arm: Remove binary sysctl support

From: Andi Kleen
Date: Mon Nov 09 2009 - 10:46:33 EST


> Can you name one binary sysctl value that gets accessed more
> than a few times during the execution of a vaguely common
> application? We're talking about microseconds for typically
> write-once or read-once settings.

For example shell scripts tend to execute programs quite a lot.

> The question is just how many sysctl values you regard as both
> common and performance critical.

Very little, I suspect in fact it's only one.

> > > in glibc-ports for the support of arm inb/outb. The only other
> > > use in older glibc was checking to see if we ran on an SMP kernel.
> >
> > That older glibc is widely deployed. And it won't go away next year.
>
> So? Most users of old glibc are also using old kernels, and they

How do you know? At least here it's quite common to use new kernels
with old user land.

> can still use the config option for the compatibility code.
> There wouldn't even be a performance penalty over new glibc with
> new kernels which already use procfs.

When he drops the sysctl(2) API completely the old userland will
be unhappy.

> > I just think you should have two flavours of emulation layer:
> > full and "common sysctls". This can be probably done with the same
> > code and some strategic ifdefs.
>
> If it's just about code size, I totally wouldn't bother. Just put the
> emulation code in loadable module and add a 'printk("Warning, %s is
> using sysctl %s, wasting %d kb of kernel memory")' to it's module_init
> function.

That means non modular kernels can't support old userland.

-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/