Re: [GnomeMeeting-devel-list] GnomeMeeting on 2.6
- From: Craig Southeren <craigs postincrement com>
- To: Christian Meder <chris onestepahead de>, gnomemeeting-devel-list gnome org
- Cc: Robert Jongbloed <robert jongbloed bigpond com>
- Subject: Re: [GnomeMeeting-devel-list] GnomeMeeting on 2.6
- Date: Sun, 01 Feb 2004 14:01:16 +1100
Christian,
So, if I understand this patch correctly, the only difference between
your proposed code and the original PWLib is to remove the sched_yield
from PThread::Current(). Is this correct?
While I think this makes much more sense that the nanosleep hack (btw: I
did not know about the 100hz/100hz change from 2.4 to 2.6) we really
need to work out why the Yield was added to PThread::Current() in the
first place. Looking at the CVS log messages should show when it was
added.
I will try and look at this soon, unless someone else is able to do it
for me :)
Craig
On Sun, 01 Feb 2004 01:33:26 +0100
Christian Meder <chris onestepahead de> wrote:
> On Sat, 2004-01-31 at 16:00, Damien Sandras wrote:
> > Hi all,
> >
> > I can confirm it fixes the problem for me too!
> >
> > Nice job!
> >
> > I think Craig can commit the fix. Thanks very much!
> >
>
> Hi,
>
> I think we can scrap the last patch as it screws up gnomemeeting on
> 2.4.x.
>
> I nailed it down to the following patch against 20040131-CVS pwlib
> version which works for me on 2.4.23 and 2.6.1.
>
> I don't know why the ifdef Linux sched_yield was there in the first
> place.
>
> I'm very interested in other people's experiences with this patch.
> Somebody still running 2.2 or 2.0 ?
>
>
>
> Christian
>
> BTW nanosleep is a big difference between 2.4 and 2.6 because 2.6 is
> running with HZ=1000 while 2.4 is HZ=100.
>
> --- pwlib-cvs-20040131.CVS/src/ptlib/unix/tlibthrd.cxx-orig 2004-02-01 01:00:32.000000000 +0100
> +++ pwlib-cvs-20040131.CVS/src/ptlib/unix/tlibthrd.cxx 2004-02-01 01:01:08.000000000 +0100
> @@ -1053,25 +1053,21 @@
> pthread_testcancel();
> #endif
>
> lastTime = PTime();
> } while (lastTime < targetTime);
> }
> #endif
>
> void PThread::Yield()
> {
> - //sched_yield();
> - // re-add this if 2.4 becomes unusable..
> - // The following patch is improving 2.6 performance and it hopefully doesn't screw 2.4 ;)
> - struct timespec timer = { 0, 1 };
> - nanosleep (&timer, NULL);
> + sched_yield();
> }
>
>
> PThread * PThread::Current()
> {
> PProcess & process = PProcess::Current();
> process.threadMutex.Wait();
> PThread * thread = process.activeThreads.GetAt((unsigned)pthread_self());
> process.threadMutex.Signal();
> return thread;
> @@ -1627,23 +1623,20 @@
> if (lockCount > 0) {
> lockCount--;
> return;
> }
>
> // otherwise mark mutex as available
> ownerThreadId = (pthread_t)-1;
> #endif
>
> PAssertPTHREAD(pthread_mutex_unlock, (&mutex));
> -#ifdef P_LINUX
> - PThread::Yield();
> -#endif
> }
>
>
> BOOL PMutex::WillBlock() const
> {
> #ifndef P_HAS_RECURSIVE_MUTEX
> pthread_t currentThreadId = pthread_self();
> if (currentThreadId == ownerThreadId)
> return FALSE;
> #endif
>
>
>
> --
> Christian Meder, email: chris onestepahead de
>
> What's the railroad to me ?
> I never go to see
> Where it ends.
> It fills a few hollows,
> And makes banks for the swallows,
> It sets the sand a-blowing,
> And the blackberries a-growing.
> (Henry David Thoreau)
>
>
>
>
>
> _______________________________________________
> Gnomemeeting-devel-list mailing list
> Gnomemeeting-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnomemeeting-devel-list
-----------------------------------------------------------------------
Craig Southeren, craigs postincrement com http://www.postincrement.com
Post Increment - Software, Consulting and Services
Co-founder of the only open source H.323 project
Phone: +61 2 43654666 Fax: +61 2 43673140 Mobile: +61 417 231046
ICQ: #86852844 MSN: craig_southeren hotmail com
GnuPG Public Key: http://www.postincrement.com/pgp.txt
Blog: http://www.southeren.com/blog/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]