ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-4766) Relax worker thread wakeup logic in StipedExecutor
Date Thu, 02 Mar 2017 07:59:45 GMT
Vladimir Ozerov created IGNITE-4766:
---------------------------------------

             Summary: Relax worker thread wakeup logic in StipedExecutor
                 Key: IGNITE-4766
                 URL: https://issues.apache.org/jira/browse/IGNITE-4766
             Project: Ignite
          Issue Type: Task
          Components: general
    Affects Versions: 1.0
            Reporter: Vladimir Ozerov
            Assignee: Vladimir Ozerov
             Fix For: 2.0


*Problem*
Worker threads in {{StripedExecutor}} have {{parked}} state flag. When set to {{true}} NIO
threads will call {{LockSupport.unpark}} after submitting new task to a queue.

The problem is that this flag is only changed by worker thread. Thus, if NIO worker submitted
a new task and called {{unpark}}, worker will clean up {{parked}} state only after real wake
up what may take microseconds. All subsequent submits from NIO thread occurred during this
time will also invoke {{unpark}} thus generating high contention on the underlying OS primitives.
Namely, condition variables which ultimately delegates to {{futex}} on Linux.

*Solution*
NIO threads must be able to clear {{parked}} state as well. Some CAS magic will be required
there. This way we will minimize number of {{unapark}} calls.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message