Re: top hogs CPU in 2.6: kallsyms_lookup is very slow

From: William Lee Irwin III
Date: Fri Sep 17 2004 - 06:08:02 EST


On Thursday 16 September 2004 15:17, William Lee Irwin III wrote:
>> How do microbenchmarks fare, e.g. lmbench?

On Fri, Sep 17, 2004 at 11:57:24AM +0300, Denis Vlasenko wrote:
> Not a lmbench, but:
[...]
> 2.4:
> # time ./openclose
> real 0m7.455s
> user 0m0.300s
> sys 0m7.150s
> 2.6:
> # time ./openclose
> real 0m8.170s
> user 0m0.370s
> sys 0m7.800s
> 2.6 is at HZ=100 here. /etc is on ramfs.
> configs are in attached tarball.

To address this in a meaningful way, we're going to have to get some
profiling data. The built-in kernel profiler should suffice, though you
may want to run the test for a longer, fixed period of time (I
recommend making the test run as long as 60s and recording the number
of operations completed). Also, please snapshot the profile state with
readprofile(1) immediately before and after the microbenchmark runs on
both kernels. This should only require booting into the kernels you've
already built with an additional commandline parameter, e.g. profile=2.

The number after the = sign is the shift used for the granularity of
accounting. With a shift of 0, the profile buffer will contain one
atomic_t (4B on ia32, e.g. your box) for every byte of kernel text.
Adding 1 to the shift halves the space needed for the profile buffer,
albeit with a concomitant decrease in the accuracy of its accounting.
profile=2 should be equivalent to the space required for a second copy
of the kernel text.

Thanks.


-- wli
-
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/