RESOLVED FIXED 147841
Convert all locking and condition variables in WebKit to use fast ParkingLot-based locks and condition variables
https://bugs.webkit.org/show_bug.cgi?id=147841
Summary Convert all locking and condition variables in WebKit to use fast ParkingLot-...
Filip Pizlo
Reported 2015-08-10 14:03:01 PDT
The grand plan is: - Make Lock use atomic increments on the fast path and ParkingLot on the slow path. This will make the fast path a lot better and will reduce the memory usage of Lock. - Give Lock and ByteLock the ability to act as their own condition variables. - Create a separate Condition that uses one byte and some ParkingLot magic, for those cases where a separate condition variable is needed. Then we can remove all uses of std::mutex, std::condition_variable, WTF::Mutex, and WTF::ThreadCondition.
Attachments
ParkingLot-based Condition (13.83 KB, patch)
2015-08-13 00:29 PDT, Filip Pizlo
no flags
the patch (27.07 KB, patch)
2015-08-13 12:09 PDT, Filip Pizlo
mark.lam: review-
Filip Pizlo
Comment 1 2015-08-13 00:29:40 PDT
Created attachment 258884 [details] ParkingLot-based Condition
Filip Pizlo
Comment 2 2015-08-13 12:09:25 PDT
Created attachment 258912 [details] the patch This patch is good to go assuming we want to land this separately from the patch that replaces all uses of ThreadCondition/std::condition_variable with this.
WebKit Commit Bot
Comment 3 2015-08-13 12:11:05 PDT
Attachment 258912 [details] did not pass style-queue: ERROR: Source/WTF/wtf/ParkingLot.cpp:561: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:68: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:83: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:91: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:115: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WTF/Condition.cpp:122: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 6 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 4 2015-08-13 12:19:23 PDT
Comment on attachment 258912 [details] the patch Missing the ChangeLog.
Filip Pizlo
Comment 5 2015-08-13 12:49:07 PDT
Comment on attachment 258912 [details] the patch I will submit this patch to a different bug.
Filip Pizlo
Comment 6 2015-08-19 11:19:59 PDT
OK, I think this is done.
Note You need to log in before you can comment on or make changes to this bug.