Bug 211633

Summary: bmalloc should have per-cpu locking mechanism
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: bmallocAssignee: Yusuke Suzuki <ysuzuki>
Status: NEW ---    
Severity: Normal CC: annulen, ews-watchlist, ggaren, gyuyoung.kim, ryuan.choi, saam, sergio
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 211809    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Yusuke Suzuki 2020-05-08 11:06:15 PDT
We are taking a global lock easily. We should not.
Talked with Phil, and current plan is introducing per-cpu locking mechanism.
Each SmallPage have Mutex*, which could point to per-cpu lock or SmallPage's fine-grained lock.
We switch them based on contention and keep deallocation fast without taking a global lock.
Comment 1 Saam Barati 2020-05-08 12:00:36 PDT
This is awesome. I think this will help wasm compile times a lot
Comment 2 Yusuke Suzuki 2020-05-18 19:08:45 PDT
Created attachment 399696 [details]
Patch

WIP
Comment 3 Yusuke Suzuki 2020-05-18 19:35:34 PDT
Created attachment 399698 [details]
Patch

WIP
Comment 4 Yusuke Suzuki 2020-05-19 00:25:33 PDT
Created attachment 399717 [details]
Patch

WIP
Comment 5 Yusuke Suzuki 2020-05-20 16:10:59 PDT
Created attachment 399906 [details]
Patch

WIP
Comment 6 Yusuke Suzuki 2020-05-20 17:36:59 PDT
Created attachment 399919 [details]
Patch

WIP
Comment 7 Yusuke Suzuki 2020-05-20 18:15:12 PDT
Created attachment 399920 [details]
Patch

WIP
Comment 8 Yusuke Suzuki 2020-05-20 18:26:26 PDT
Created attachment 399921 [details]
Patch

WIP
Comment 9 Yusuke Suzuki 2020-05-26 12:00:04 PDT
Created attachment 400264 [details]
Patch

WIP
Comment 10 Yusuke Suzuki 2020-06-02 06:57:12 PDT
Created attachment 400814 [details]
Patch

WIP