linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: memcpy to videoram eats too much CPU on ATI cards (cach
@ 2001-08-27 20:46 Petr Vandrovec
  0 siblings, 0 replies; only message in thread
From: Petr Vandrovec @ 2001-08-27 20:46 UTC (permalink / raw)
  To: Peter Surda; +Cc: linux-kernel

On 27 Aug 01 at 20:13, Peter Surda wrote:
> 
> memcpy-ing 380kB at 25fps takes about 5ms per frame and causes X to eat 1% cpu
> time (time measurements were done by tsc)
> 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)

It is because of way how time accounting to processes works in Linux.
Your X-server gets time quantum, and starts copying data to videoram.
If it finishes before 1/HZ seconds, no consumed time is accounted to it.

As soon as task does not finish its job in 1/HZ seconds, some time is
accounted to it. Just try running some benchmark together with
your memcpy. You'll found that benchmark slowdown is (almost) linear with
memcpy size. Especially if you'll run benchmark on some nice level.

You can try varying size around 650-750kBs, and you'll find that it clibms
up very quickly in this range, just when consumed time crosses 10ms.
                                        Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-27 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-27 20:46 memcpy to videoram eats too much CPU on ATI cards (cach Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).