From: Mark V. <mvo...@nv...> - 2002-05-07 22:28:35
|
On Tue, 7 May 2002, Peter Surda wrote: > Hi! > > Preface for those who don't remember: playing videos on r128 with > XvShmPutImage used to take a lot of CPU time, about 25% for DVD, inside > SYSTEM. The cause was found to be slow videoram and was solved by using > DRI's > DMA functions. Suddenly, several months later, roughly the same amount > of CPU > again started to be consumed, this time in userspace though, even if DRI > is > enabled. If DRI is disabled, it is even worse: CPU time is eaten both in > SYSTEM and USER, consuming a total of about 50% CPU while basically > doing > nothing. > > I have yet another idea what could be causing this. > > As Volodya said, calling XvShmPutImage doesn't actually put the stuff on > the > screen, it just queues it and returns. A client application (in my case > SDL > and Mplayer's vo_xv) then calls XSync (or XFlush) immediately > afterwards. I > assume XSync does a busy loop, which "eats CPU time". No. XSync goes to sleep until the X-server replies. Mark. |