[uae] Re: Source code snapshot

  • From: Lem <l3mming@xxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Sat, 11 Sep 2004 13:22:06 +1000

Hi Rich,

 I've found another quirk with UAE (this will apply to all versions).
With the event of CPU frequency scaling, the "calibrating delay loop"
function of UAE will provide inaccurate values.

 I have an Athlon64, and I normally have CPU frequency scaling
(Cool'n'Quiet) enabled to conserve power and generate less heat. When I
start UAE, my CPU is running at 1Ghz. Due to UAE making the processor
work, the frequency gets ramped up to 2Ghz (after the delay loop is
already calibrated on 1Ghz). This causes UAE to use less CPU than what
is available (even when the JIT engine is running at full tilt).

 I'm not sure how you would fix this .. perhaps check whether cpu
frequency scaling is enabled (sysfs object under Linux 2.6) and do some
math to calculate what the delay loop should be, or, cause 100% CPU
usage for a few seconds to cause the frequency to be ramped up, then
calibrate the delay loop.. At the moment I disable powernowd
(application which manages CPU frequency scaling) to run UAE.

 I would assume that this quirk exists on all architectures which
support frequency scaling (Intel, AMD, Transmeta, etc).

Thanks,
Lem


Other related posts: