eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.26k stars 717 forks source link

Could we provide an option to bypass the yieldCPU() call in spinOnFlatLock? #9906

Open zl-wang opened 4 years ago

zl-wang commented 4 years ago

During previous customer PoC, it was found that there was big performance benefit to be gained tuning the spin count and getting rid of the yieldCPU() call. The workload is not that friendly on a big machine. It is also understood that getting rid of yieldCPU() may hurt other workloads. Such that, this asks for an option to meet both worlds on the best possible terms.

DanHeidinga commented 4 years ago

@babsingh has been working on retuning our locks to use an MCS-based lock to address high contention scenarios. I'd like to see that work complete before we patch an additional test+branch into our locks

DanHeidinga commented 4 years ago

@babsingh can you link this to your overall MCS lock design?

babsingh commented 4 years ago

Related: https://github.com/eclipse/openj9/issues/5681 (linking to the overall MCS lock design).