lkml.org 
[lkml]   [2001]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: memcpy to videoram eats too much CPU on ATI cards (cach
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/

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