Scheduler profiling - Use immediate values
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Andi Kleen
Quoted 5 lines · Alexey Dobriyan
Quoted 2 lines · Mathieu Desnoyers
Use immediate values with lower d-cache hit in optimized version as a condition for scheduler profiling call.
Quoted 6 lines
Quoted 3 lines
I think it's better to put
profile.cunderCONFIG_PROFILINGas _expected_, soCONFIG_PROFILING=nusers won't get any overhead, immediate or not. That's what I'm going to do after test-booting bunch of kernels.No, it's better to handle this efficiently at runtime e.g. for distribution kernels. Mathieu's patch is good
IMO you should combine them. For distibutions, it may be good to include profiling support unconditionally, but how many of the vanilla kernel users are going to use profiling at all?
Signature · 4 lines
A man inserted an advertisement in the classified: Wife Wanted." The next day he received a hundred letters. They all said the same thing: "You can have mine." Friß, Spammer: [email protected] [email protected]
Quoted 11 lines · * Bodo Eggert ([email protected]) wrote:
Quoted 10 lines · Andi Kleen
Quoted 8 lines · Alexey Dobriyan
Quoted 2 lines · Mathieu Desnoyers
Use immediate values with lower d-cache hit in optimized version as a condition for scheduler profiling call.
I think it's better to put
profile.cunderCONFIG_PROFILINGas _expected_, soCONFIG_PROFILING=nusers won't get any overhead, immediate or not. That's what I'm going to do after test-booting bunch of kernels.
Quoted 6 lines
Quoted 2 lines
No, it's better to handle this efficiently at runtime e.g. for distribution kernels. Mathieu's patch is good
IMO you should combine them. For distibutions, it may be good to include profiling support unconditionally, but how many of the vanilla kernel users are going to use profiling at all?
For CONFIG_PROFILING, I think of it more like a chicken and egg problem:
as long as it won't be easy to enable when needed in distributions kernels, few profiling applications will use it. So if you ban it from distros kernel with a CONFIG option under the pretext that no profiling application use it, you run straight into a conceptual deadlock. :)
Another simliar example would be CONFIG_TIMER_STATS, used by powertop, which users will use to tune their laptops (I got 45 minutes more battery time on mine thanks to this wonderful tool). Compiling-in, but dynamically turning it on/off makes sense for a lot of kernel "profiling/stats extraction" mechanisms like those.
But I suspect they will be used by distros only when their presence when disabled will be unnoticeable or when a major portion of their users will yell loudly enough telling that they want this and this features, leaving the more specialized minority of distro users without these features that they need to fine-tune their applications or their kernel.
Mathieu
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Quoted 31 lines · Mathieu Desnoyers
Quoted 11 lines · * Bodo Eggert ([email protected]) wrote:
Quoted 10 lines · Andi Kleen
Quoted 8 lines · Alexey Dobriyan
Quoted 2 lines · Mathieu Desnoyers
Use immediate values with lower d-cache hit in optimized version as a condition for scheduler profiling call.
I think it's better to put
profile.cunderCONFIG_PROFILINGas _expected_, soCONFIG_PROFILING=nusers won't get any overhead, immediate or not. That's what I'm going to do after test-booting bunch of kernels.Quoted 6 lines
Quoted 2 lines
No, it's better to handle this efficiently at runtime e.g. for distribution kernels. Mathieu's patch is good
IMO you should combine them. For distibutions, it may be good to include profiling support unconditionally, but how many of the vanilla kernel users are going to use profiling at all?
For
CONFIG_PROFILING, I think of it more like a chicken and egg problem:
as long as it won't be easy to enable when needed in distributions kernels, few profiling applications will use it. So if you ban it from distros kernel with a CONFIG option under the pretext that no profiling application use it, you run straight into a conceptual deadlock. :)Another simliar example would be
CONFIG_TIMER_STATS, used by powertop, which users will use to tune their laptops (I got 45 minutes more battery time on mine thanks to this wonderful tool). Compiling-in, but dynamically turning it on/off makes sense for a lot of kernel "profiling/stats extraction" mechanisms like those.
Quoted 5 lines
But I suspect they will be used by distros only when their presence when disabled will be unnoticeable or when a major portion of their users will yell loudly enough telling that they want this and this features, leaving the more specialized minority of distro users without these features that they need to fine-tune their applications or their kernel.
There's a surprisingly simple solution solving the problems you describe:
For userspace libraries, the common approach is to get them stripped and have versions with all debugging symbols in some -dbg package. So if you want to debug an application using such a library, you simply install this -dbg package.
Just let distributions make the same for the kernel - add a -dbg flavour with many debugging options enabled. It might perhaps run 5% or 20% slower than the regular kernel, but you don't need profiling or powertop during normal operation - these are _debug_ tools.
This way, there's no runtime penalty and therefore no trickery required for getting the overhead of _debug code_ lower.
Quoted 1 line
Mathieu
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed