[SERVER-65914] Investigate using a CLH-style lock queue for fairness Created: 25/Apr/22  Updated: 06/Dec/22  Resolved: 15/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Daniel Gomez Ferro Assignee: Backlog - Storage Execution Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

Java uses a modified CLH lock queue to implement fair semaphores:
https://github.com/openjdk/jdk/blob/jdk-9%2B102/jdk/src/java.base/share/classes/java/util/concurrent/Semaphore.java#L172
https://github.com/openjdk/jdk/blob/jdk-9%2B102/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java

This could be more performant than our current implementation that uses a mutex on top of a queue.



 Comments   
Comment by Jordi Olivares Provencio [ 15/Jun/22 ]

Focus has been directed at detecting when the system is overloaded and scheduling of operations

Generated at Thu Feb 08 06:03:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.