David Engel wrote:
On Tue, Nov 30, 2004 at 10:55:07AM -0500, Doug Larrick wrote:

David Engel wrote:

That's the problem!  Try changing the decoder_lock from a QMutext to a
pthread_mutex_t and see if that helps.  I suspect it will, and will
also get rid of the sched_yield which I didn't like anyway.  If you
can't make the change, I will do it tonight.

I'll give it a try. I might be able to get to this tonight.


Well, pthread_mutex_t seems to have the same problem as QMutex in that
a precess already waiting doesn't get priority over a process that
releases, yields and reacquires. :(  IOW, the sched_yield is stil needed
on UP and probably won't help much on SMP.  You can try mutex.patch for
yourself if you like.

getframe.patch partially implements my return early from NVP::GetFrame
suggestion.  It's for testing only, but please give it a try.  If it
works OK, I'll flesh it out.

I did some testing myself this evening, and yes, pthread_mutex_t doesn't help for me either.

What *does* work on my HyperThreaded box is replacing the sched_yield with a small usleep (I used 50; I notice you used 1000); either one should resolve to about 1 scheduler interval.

I am concerned though that this loop is spending way too much time just spinning during normal playback, especially with your getframe.patch. Maybe I'm being dense, but where exactly is it that it sleeps (rather than busy-waits) if we don't need a new frame yet?

-Doug

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mythtv-dev mailing list
[EMAIL PROTECTED]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to