This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Preheat CPU in benchtests
- From: Andi Kleen <andi at firstfloor dot org>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Andi Kleen <andi at firstfloor dot org>, libc-alpha at sourceware dot org
- Date: Tue, 23 Apr 2013 20:44:51 +0200
- Subject: Re: [PATCH] Preheat CPU in benchtests
- References: <20130423061028 dot GA6257 at domone dot kolej dot mff dot cuni dot cz> <m27gjtwcmf dot fsf at firstfloor dot org> <20130423151725 dot GA16219 at domone dot kolej dot mff dot cuni dot cz>
> > FWIW it's generally safer to disable frequency scaling explicitely
> > through sysfs (but that needs root), as the reaction time of the
> > p-state governour can be unpredictable.
> Which needs root, so it would request typing password each time you run
> automated benchmarks.
>
> I consider for some time by CPU_CLK_UNHALTED performance counter.
> However a documentation is lacking and I need it with low overhead.
It can be done with newer perf or for older kernels with simple-pmu
(http://halobates.de/simple-pmu.html)
I have some example code for perf if you want.
However it has the disadvantage that it doesn't affect the frequency
of parts of the CPU outside the CPU. So the memory controller
may still be running with low frequency etc., so the ratio
between core and other parts of the system can change.
So overall it's still better to set a fixed frequency.
-Andi