jackmp rev 3695 bad change in posix/JackPosixThread.cpp

View: New views
4 Messages — Rating Filter:   Alert me  

jackmp rev 3695 bad change in posix/JackPosixThread.cpp

by Andreas Degert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

the substitution of fThread with pthread_self() should be reverted, it
acquires / drops realtime scheduling for the calling thread of the
client instead of the processing thread.

check:

start ardour, use

ps -eLo pid,tid,rtprio,sched,comm | grep ardour

and watch for the difference in realtime priorities before and after
applying the patch (and use your ears :-).

ciao
Andreas
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Re: jackmp rev 3695 bad change in posix/JackPosixThread.cpp

by Andreas Degert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 7 Nov 2009 00:13:36 +0100
Andreas Degert <ad@...> wrote:

> Hi,
>
> the substitution of fThread with pthread_self() should be reverted, it
> acquires / drops realtime scheduling for the calling thread of the
> client instead of the processing thread.
>
> check:
>
> start ardour, use
>
> ps -eLo pid,tid,rtprio,sched,comm | grep ardour
>
> and watch for the difference in realtime priorities before and after
> applying the patch (and use your ears :-).
attached patch for reverting the change (maybe windows/mac has the same
problem, but i can't test).

ciao
Andreas

[diff-3695-bad.diff]

Index: posix/JackPosixThread.cpp
===================================================================
--- posix/JackPosixThread.cpp (Revision 3715)
+++ posix/JackPosixThread.cpp (Arbeitskopie)
@@ -205,7 +205,7 @@
 
 int JackPosixThread::AcquireRealTime()
 {
-    return AcquireRealTimeImp(pthread_self(), fPriority);
+    return (fThread != (pthread_t)NULL) ? AcquireRealTimeImp(fThread, fPriority) : -1;
 }
 
 int JackPosixThread::AcquireRealTime(int priority)
@@ -232,7 +232,7 @@
 
 int JackPosixThread::DropRealTime()
 {
-    return DropRealTimeImp(pthread_self());
+    return (fThread != (pthread_t)NULL) ? DropRealTimeImp(fThread) : -1;
 }
 
 int JackPosixThread::DropRealTimeImp(pthread_t thread)


_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Re: jackmp rev 3695 bad change in posix/JackPosixThread.cpp

by Stéphane Letz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 7 nov. 2009 à 00:29, Andreas Degert a écrit :

> On Sat, 7 Nov 2009 00:13:36 +0100
> Andreas Degert <ad@...> wrote:
>
>> Hi,
>>
>> the substitution of fThread with pthread_self() should be reverted,  
>> it
>> acquires / drops realtime scheduling for the calling thread of the
>> client instead of the processing thread.
>>
>> check:
>>
>> start ardour, use
>>
>> ps -eLo pid,tid,rtprio,sched,comm | grep ardour
>>
>> and watch for the difference in realtime priorities before and after
>> applying the patch (and use your ears :-).
>
> attached patch for reverting the change (maybe windows/mac has the  
> same
> problem, but i can't test).
>


Thanks for the patch...  but the initial change had some deeper  
reasons... Obviously it breaks when used In JackClient.cpp so I'll  
have to find a solution that works in all cases.

Anyway thanks for reporting, and yes JACK2 SVN is broken after rev 3695.

Stéphane
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Re: jackmp rev 3695 bad change in posix/JackPosixThread.cpp

by Stéphane Letz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 7 nov. 2009 à 00:29, Andreas Degert a écrit :

> On Sat, 7 Nov 2009 00:13:36 +0100
> Andreas Degert <ad@...> wrote:
>
>> Hi,
>>
>> the substitution of fThread with pthread_self() should be reverted,  
>> it
>> acquires / drops realtime scheduling for the calling thread of the
>> client instead of the processing thread.
>>
>> check:
>>
>> start ardour, use
>>
>> ps -eLo pid,tid,rtprio,sched,comm | grep ardour
>>
>> and watch for the difference in realtime priorities before and after
>> applying the patch (and use your ears :-).
>
> attached patch for reverting the change (maybe windows/mac has the  
> same
> problem, but i can't test).
>
> ciao
> Andreas


Should be fixed in SVN  rev 3716 (http://trac.jackaudio.org/changeset/3716 
)

Can you possibly test and report?

Thanks

Stéphane
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org