Re: [PATCH] Use uname not sysctl to get the kernel revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/13/06, Eric W. Biederman <[email protected]> wrote:
"Albert Cahalan" <[email protected]> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux