-
Enhancement
-
Resolution: Fixed
-
P3
-
11
-
b01
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8254858 | 11.0.10-oracle | Patrick Zhang | P3 | Resolved | Fixed | b03 |
JDK-8255535 | openjdk8u282 | Patrick Zhang | P3 | Resolved | Fixed | b01 |
JDK-8255372 | 8u281 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b03 |
JDK-8257290 | emb-8u281 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | team |
This ticket actually covers a tiny part from JDK-8243326, Cleanup use of volatile in taskqueue code.
class TaskQueueSuper has two volatile variables: _bottom and _age declared side by side, and the instances are widely used by g1 and cms functions, while many atomic functions operate on these two variables during the execution of the known work stealing algorithm among a number of threads,e.g. decided by ParallelGCThreads. Therefore, false-share caching contention would occur here and there. The proposed code change can be safe enough as it does not change any function explicitly, and performance measurement on benchmarks and small cases show positive effect steadily (please note it is difficult to completely reproduce the work-stealing algorithm and cache contentions in small test cases).
A tiny part ofJDK-8243326 added padding around the two variables with DEFINE_PAD_MINUS_SIZE which fixed the mentioned potential issue by the way. However it is no need to backport the whole patch (https://hg.openjdk.java.net/jdk/jdk/rev/252a1602b4c6) due to the complex context especially the new load/store atomic functions introduced beyond jdk11u.
class TaskQueueSuper has two volatile variables: _bottom and _age declared side by side, and the instances are widely used by g1 and cms functions, while many atomic functions operate on these two variables during the execution of the known work stealing algorithm among a number of threads,e.g. decided by ParallelGCThreads. Therefore, false-share caching contention would occur here and there. The proposed code change can be safe enough as it does not change any function explicitly, and performance measurement on benchmarks and small cases show positive effect steadily (please note it is difficult to completely reproduce the work-stealing algorithm and cache contentions in small test cases).
A tiny part of
- backport of
-
JDK-8243326 Cleanup use of volatile in taskqueue code
- Resolved
- backported by
-
JDK-8254858 Add paddings for TaskQueueSuper to reduce false-sharing cache contention
- Resolved
-
JDK-8255372 Add paddings for TaskQueueSuper to reduce false-sharing cache contention
- Resolved
-
JDK-8255535 Add paddings for TaskQueueSuper to reduce false-sharing cache contention
- Resolved
-
JDK-8257290 Add paddings for TaskQueueSuper to reduce false-sharing cache contention
- Resolved