Using mprotect for IPI have several problems (admittedly it's cool hack):
- It's not guaranteed to work on future hardware/OS:es (we could start using membarrier() with the MEMBARRIER_CMD_SHARED_EXPEDITED to be future prof)
- It doesn't work on arm/arm64 (again MEMBARRIER_CMD_SHARED_EXPEDITED would solve this)
- Eventbased tracing must read thread states often (causes performance issues)
- The complexity in the code is costly
- The thread serialization is unstable on certain workloads/platforms/OS:es (last notice this week on win x86)
- Fences are becoming cheaper
- Thread-local handshakes is assumed to increase the reading of thread state
- Scalability
- JNI performance - false sharing
Note that some application can show performance regression.
This is especially true for application with few threads which does many short native calls.
- It's not guaranteed to work on future hardware/OS:es (we could start using membarrier() with the MEMBARRIER_CMD_SHARED_EXPEDITED to be future prof)
- It doesn't work on arm/arm64 (again MEMBARRIER_CMD_SHARED_EXPEDITED would solve this)
- Eventbased tracing must read thread states often (causes performance issues)
- The complexity in the code is costly
- The thread serialization is unstable on certain workloads/platforms/OS:es (last notice this week on win x86)
- Fences are becoming cheaper
- Thread-local handshakes is assumed to increase the reading of thread state
- Scalability
- JNI performance - false sharing
Note that some application can show performance regression.
This is especially true for application with few threads which does many short native calls.
- csr for
-
JDK-8187812 UseMembar should be set true and deprecate the flag
-
- Closed
-
- relates to
-
JDK-8213436 Obsolete UseMembar
-
- Resolved
-
-
JDK-8152292 Consider using proper OS APIs for os::serialize_thread_states
-
- Closed
-
-
JDK-8143878 Memory serialization page can become a bottleneck
-
- Closed
-