From: "Albert Cahalan" <acahalan@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: ak@suse.de, tytso@mit.edu, drepper@redhat.com,
arjan@infradead.org, rdunlap@xenotime.net, akpm@osdl.org,
linux-kernel@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: [PATCH] Use uname not sysctl to get the kernel revision
Date: Thu, 13 Jul 2006 13:06:32 -0400 [thread overview]
Message-ID: <787b0d920607131006p5f55c9c7veadb840042a10ba@mail.gmail.com> (raw)
In-Reply-To: <m1lkqx30pl.fsf@ebiederm.dsl.xmission.com>
On 7/13/06, Eric W. Biederman <ebiederm@xmission.com> wrote:
> "Albert Cahalan" <acahalan@gmail.com> writes:
> > Matching keywords, as is needed for /proc/*/status,
> > is also horribly slow. I ended up using gperf to make
> > a perfect hash table, then gcc's computed goto for
> > jumping to the code, and it still wasn't cheap to do.
> > (while /sys lacks this, the extra open-read-close is
> > certain to be far worse)
>
> I agree matching keywords and such seems slow.
>
> If the only overhead comes from open-read-close we can
> come up with a sys_readfile that doesn't need to actually
> open the file for one shot cases.
A sys_readfile would be great. It probably should
work like readlink. Supplying a struct stat without
a race condition would be good too.
Note that /sys will still be needlessly slow because
of the one-item-per-file idea. One of the few good
things about /proc is that you can get a whole
struct full of data all at once.
Fixing one bottleneck just leads to the next. It's best
to fix all the anti-performance stupidity at once.
next prev parent reply other threads:[~2006-07-13 17:06 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 5:00 Albert Cahalan
2006-07-13 5:42 ` H. Peter Anvin
2006-07-13 6:09 ` Albert Cahalan
2006-07-13 6:13 ` Albert Cahalan
2006-07-13 6:38 ` Eric W. Biederman
2006-07-13 16:15 ` Albert Cahalan
2006-07-13 16:53 ` Eric W. Biederman
2006-07-13 17:06 ` Albert Cahalan [this message]
2006-07-13 15:20 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2006-07-10 22:39 [PATCH] sysctl: Document that sys_sysctl will be removed Eric W. Biederman
2006-07-10 22:50 ` Randy.Dunlap
2006-07-11 4:10 ` Eric W. Biederman
2006-07-11 7:07 ` Arjan van de Ven
2006-07-12 16:25 ` [PATCH] Use uname not sysctl to get the kernel revision Eric W. Biederman
2006-07-12 16:50 ` Ulrich Drepper
2006-07-12 17:42 ` Eric W. Biederman
2006-07-12 23:24 ` Theodore Tso
2006-07-12 23:31 ` Andi Kleen
2006-07-13 0:12 ` Theodore Tso
2006-07-13 2:33 ` Eric W. Biederman
2006-07-13 12:15 ` Andi Kleen
2006-07-12 23:44 ` Steve Munroe
2006-07-14 18:49 ` Benjamin Herrenschmidt
2006-07-14 19:09 ` Andi Kleen
2006-07-13 0:19 ` Eric W. Biederman
2006-07-12 18:44 ` Roland McGrath
2006-07-12 19:33 ` Ulrich Drepper
2006-07-12 19:53 ` Jakub Jelinek
2006-07-12 20:09 ` H. Peter Anvin
2006-07-12 21:23 ` Eric W. Biederman
2006-07-12 21:29 ` Arjan van de Ven
2006-07-12 21:56 ` Eric W. Biederman
2006-07-12 22:01 ` Arjan van de Ven
2006-07-12 22:02 ` H. Peter Anvin
2006-07-12 22:26 ` Eric W. Biederman
2006-07-12 22:31 ` H. Peter Anvin
2006-07-12 23:07 ` Alan Cox
2006-07-12 23:19 ` H. Peter Anvin
2006-07-13 11:15 ` Alan Cox
2006-07-14 18:45 ` Benjamin Herrenschmidt
2006-07-14 19:11 ` H. Peter Anvin
2006-07-12 21:29 ` H. Peter Anvin
2006-07-12 21:33 ` Michael Tokarev
2006-07-13 5:17 ` Ulrich Drepper
2006-07-13 6:27 ` Ian Wienand
2006-07-13 14:39 ` Eric W. Biederman
2006-07-13 15:05 ` Arjan van de Ven
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=787b0d920607131006p5f55c9c7veadb840042a10ba@mail.gmail.com \
--to=acahalan@gmail.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=drepper@redhat.com \
--cc=ebiederm@xmission.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®