[ 
https://issues.apache.org/jira/browse/DISPATCH-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17404673#comment-17404673
 ] 

ASF subversion and git services commented on DISPATCH-2238:
-----------------------------------------------------------

Commit 10a0a56db2b83fef6271d9413d36b8efd240f071 in qpid-dispatch's branch 
refs/heads/main from Ken Giusti
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=10a0a56 ]

DISPATCH-2238: optimization of core action lock use.

Analysis of mutex use shows that the core action list mutex is heavily
contended.  This patch implements a few tricks to reduce the amount of
time the lock is held.

This closes #1349


> Avoid holding the core action lock when waking the core thread
> --------------------------------------------------------------
>
>                 Key: DISPATCH-2238
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2238
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>          Components: Router Node
>    Affects Versions: 1.17.0
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>            Priority: Minor
>             Fix For: 1.18.0
>
>
> Currently when an action is queued for the core to process, the queuing code 
> calls pthread_cond_signal() while holding the associated mutex.  This can 
> cause the core thread to be woken then immediately put sleep while taking the 
> mutex.
>  
> It is legal to call pthread_cond_signal() without holding the lock. Doing 
> this will avoid contention on the associated mutex.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to