From: Heiko S. <hsc...@ft...> - 2001-10-05 18:35:16
|
Hi Daniel, in a discussion on the xine (video player, see http://xine.sf.net) mailing lists about the bad performance of xine on freebsd (as compared to gnu/linux) it was suggested (see below) that contacting you might be a good idea :) by now it is clear that we are somehow using freebsd's userspace threads (i'm using 4-stable) the wrong way. so what i'm hoping is that you could give some hints on how to properly use them... basically the problem is that xine has a video_out thread that contains an infinite loop which is waiting (for example) 1/60 of a second and then resumes work. xine in it's original form uses sigalarm / set_itimer / pause to achieve this (this can be seen on http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/xine/xine-lib/src/xine-engine/video_out.c?rev=HEAD&content-type=text/vnd.viewcvs-markup in the function video_out_loop()). but on freebsd it looks like this doesn't do the trick. the loop appears not to be executed often enough. we did some experiments using usleep() and sleep() instead of the signals, but it seems these calls didn't take any time, but instead produced an ALARM signal. is there any other way to make a freebsd pthread go to sleep for a given (short - some microseconds) amount of time ? it would be great if you could shed some light on all of this. thanks in advance, regards, Heiko ---------- Forwarded message ---------- Date: Thu, 04 Oct 2001 17:20:59 -0500 From: Matthew Reimer <mr...@vp...> To: Heiko Schaefer <hsc...@ft...> Subject: Re: xine performance on freebsd. Heiko Schaefer wrote: > > Hey everyone, > > > > I wonder if performance could be improved by linking xine against the > > > linuxthreads port instead of libc_r when building on FreeBSD? > > i've given that a half-hearted try once, but want to dig into that > again... You might find it helpful to look at the mysql323-server port, which can be built against linuxthreads by "make -DWITH_LINUXTHREADS". > > IIRC that's a shortcut to coredumps. I remember having all sorts of > > threads problems with the various threads packages I had. > > hmm - that was my first result when i tried :) so does that mean the > linuxthreads port on freebsd is not usable at all ?! Maybe Daniel Eischen <ei...@vi...> can help -- he's the maintainer of FreeBSD's pthreads stuff. I don't know if he maintains the linuxthreads port or not. > Heiko (looking forward to fluent dvd playback on freebsd :)) Me too! Then I won't have to boot to Linux to watch DVDs. :) Matt |