[lkml]   [2001]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: memcpy to videoram eats too much CPU on ATI cards (cache trashing?)
Alan Cox wrote:
> > cause any CPU load (or more precisely, non-measurable load). However, with
> > mach64 and r128, it DOES. I did some more research.
> Makes sense
> > memcpy-ing 380kB at 25fps takes about 5ms per frame and causes X to eat 1% cpu
> > time (time measurements were done by tsc)

1%? at 5ms/f * 25 f/s = 125 ms/ second. = 12% of your CPU.

However, as the X server manages to finish doing what it has to do
before the next timer tick, it will almost never get a timer tick
accounted to it.

> > memcpy-ing 760kB at 25fps takes about 11ms per frame, but instead of eating
> > 2% CPU time, it eats 35% (yes, that's 35 times more)

So at 2.2 times as much CPU time, I'd expect around 27% real
usage. But instead of managing to miss the timer tick almost every
time, it is now managing to hit slightly more than average on the
timer ticks. Or it's using a little bit more than you measured.

By doing stuff that takes on the order of a timer tick, and to trigger
them off a timer event, means that CPU time measurements can become
highly inaccurate.

If you buy CPUtime on a large unix computer, and have a tight
mainloop, you can measure the number of iterations you can do inside
your mainloop in 9ms. Then schedule an "usleep (1)" every time you hit
that many iterations. Cheap computing... ;-)


** ** ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:58    [W:0.103 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site