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

Arnd Bergmann
2009-11-09T16:23:26Z

On Monday 09 November 2009, Andi Kleen wrote:
> >
> > 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.

If by 'here' you mean kernel developers, sure. Other people I'd
assume typically run whatever comes with the distro, and that
usually includes both a libc and a kernel.

> > 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 did not get the impression that this was the plan. Maybe I missed
something, but the work that Eric did seemed to be strategic for
leaving the code around for a really long time without causing any
maintainance pain that the current code does.

It will be years before we can really remove that code, but distros
can start disabling it (or making it modular) earlier than that
when they feel the time has come to stop support for static binaries
using sysctl (there should really be few of those).

> > > 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.

Well, non-modular kernels are rather rare and they can still have the
code builtin. It's not something I'd put a lot of work optmizing for
though. I'd guess that most uses of non-modular kernels also come with
a pretty much fixed set of supported binaries.