Re: memcpy to videoram eats too much CPU on ATI cards (cach

From: Petr Vandrovec (VANDROVE@vc.cvut.cz)
Date: Mon Aug 27 2001 - 13:47:57 EST


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
                                                
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:24 EST