[MPlayer-dev-eng] [PATCH] revert CPU speed detection
Aurelien Jacobs
aurel at gnuage.org
Fri Oct 8 00:12:19 CEST 2004
On Thu, 7 Oct 2004 15:08:01 -0400
D Richard Felker III <dalias at aerifal.cx> wrote:
> On Thu, Oct 07, 2004 at 08:02:50PM +0200, Aurelien Jacobs wrote:
> > On Thu, 7 Oct 2004 04:34:50 +0200
> > Diego Biurrun <diego at biurrun.de> wrote:
> >
> > > Hi!
> > >
> > > I've had a look at a way to make the CPU speed detection run only
> > > in verbose mode but then reconsidered. Speed detection has never
> > > worked reliably and slows down startup noticeably.
> >
> > Maybe an explaination of GetCpuSpeed reliablility. The rdtsc
> > instruction is not serializing which may mean that edx:eax registers
> > have still not been updated at the time the seepd is caculated ?
>
> this seems very doubtful...
>
> > This seems a bit silly
> > to me, but the attached patch makes cpu speed detection more
> > reliable.
>
> hehehe @ the patch! :)
> the whole reason it's being removed is that it sleeps and wastes time,
> not that it's inaccurate. making it sleep longer (even if just a
> little bit...and i don't trust that something else won't get scheduled
> in the meantime)
>
> anyway if you need a delay after rdtsc just do a small asm segment
> that will serialize. making a function call will only make the
> situation worse since eax/edx have to get pushed before the call and
> restored afterwards. but i still don't believe the thing about
> non-serialized meaning you can read wrong values...
Ok. I didn't understand reliable as inaccurate !
In fact, on my system (Athlon64), reported CPU speed was simply 0 !
And I thought that's what Diego called unreliable.
And yes, with my dumb patch, my system display the right cpu speed !
So I agree that the serialization is a bad explanation, but I can't
come with a better one. Can you explain this behavior differently ?
Aurel
More information about the MPlayer-dev-eng
mailing list