From: ebiederm@xmission.com (Eric W. Biederman)
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysctl: Allow /proc/sys without sys_sysctl
Date: Wed, 12 Jul 2006 10:36:32 -0600 [thread overview]
Message-ID: <m1ac7ebx0v.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <200607121808.26555.ak@suse.de> (Andi Kleen's message of "Wed, 12 Jul 2006 18:08:26 +0200")
Andi Kleen <ak@suse.de> writes:
> On Wednesday 12 July 2006 17:32, Eric W. Biederman wrote:
>> Andi Kleen <ak@suse.de> writes:
>>
>> >> So it will correctly handle that sysctl being compiled out, and
>> >> the fallback to using /proc. The code seems to have been
>> >> doing that since it was added to glibc in 2000.
>> >
>> > Using /proc is extremly slow for this.
>>
>> How so it is the same code in the kernel. Is open much slower than
>> sys_sysctl?
>
> Yes, the VFS adds quite a lot of overhead with its zillions of
> locks and other complicated things.
>
> I have also people complaining about /proc/cpuinfo overhead.
Yes. I just confirmed that /proc/sys access is about an order
of magnitude slower. I goofed and forgot to add you to the
cc list but I just sent a patch to Ulrich to switch glibc to using
uname for this case. uname is even faster than sysctl.
I am very curious to understand where the overhead is coming
from. It may just be the VFS or it may be stupidities in
the /proc implementation. If things are really as bad as
they appear it puts a serious damper on the plan9 style everything
is a filesystem approach.
>> > You added significant cost to each program startup.
>>
>> Not each program only the ones that use pthreads.
>
> In modern glibc it's basically everything
It shouldn't be. You can support be thread safe without pulling
in glibc. But yes it is common.
>> > I still think it's a good idea to simulate that sysctl and printk
>> > the others.
>>
>> To reduce the noise something like that makes sense. I'm going to
>> see if I can get glibc to use uname which should have the same effect.
>
> And still printk for all old binaries? Not a good idea.
>
> You have to check for this case in the printk stub anyways and
> if you check for it you can as well emulate it
> (with a big fat comment that this won't be done for any other sysctl)
I will see how it goes.
Eric
next prev parent reply other threads:[~2006-07-12 16:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:38 Eric W. Biederman
2006-07-10 22:48 ` Randy.Dunlap
2006-07-11 4:00 ` Eric W. Biederman
2006-07-11 4:19 ` Andrew Morton
2006-07-11 6:57 ` Eric W. Biederman
2006-07-11 7:04 ` Andrew Morton
2006-07-11 7:52 ` Eric W. Biederman
2006-07-11 8:05 ` Andrew Morton
2006-07-11 7:23 ` [PATCH] sysctl: Scream if someone uses sys_sysctl Eric W. Biederman
2006-07-11 22:26 ` [PATCH] sysctl: Allow /proc/sys without sys_sysctl Andi Kleen
2006-07-12 3:13 ` Eric W. Biederman
2006-07-12 13:32 ` Andi Kleen
2006-07-12 14:47 ` Eric W. Biederman
2006-07-12 14:52 ` Andi Kleen
2006-07-12 15:32 ` Eric W. Biederman
2006-07-12 16:08 ` Andi Kleen
2006-07-12 16:36 ` Eric W. Biederman [this message]
2006-07-12 18:24 ` Stephen Hemminger
2006-07-12 19:58 ` Arjan van de Ven
2006-07-13 0:52 ` Theodore Tso
2006-07-14 20:09 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1ac7ebx0v.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome