• Maged Michael's avatar
    hazard pointers: Add microbenchmark of thread cache misses · 4a7ac66b
    Maged Michael authored
    Summary:
    Add a microbenchmark for thread cache misses.
    
    Add member function evict to hazptr_tc.
    
    Add free function hazptr_tc_evict for use in testing and benchmarking only.
    
    Remove the warning for thread cache overflow.
    
    Add member function delete_hazard_pointers to hazptr_domain to be used only for testing and benchmarking.
    
    ## Microbenchmark Results
    
    Results for TC hits and misses under an extreme case of 10000 in-use hazard pointers:
    ```
    10x construct/destruct hazptr_array<9>            105 ns     97 ns     95 ns
    1/1000 TC hit + miss & overflow                   550 ns    502 ns    468 ns
    ```
    
    The latency for constructing/destroying a 9-hazard-pointer-array from TC hits is about 10 ns.
    
    The latency for constructing/destroying two 9-hazard-pointer-arrays from one TC hit and one TC miss/overflow is about 500 us (i.e., 500,000 ns).
    
    Reviewed By: yfeldblum
    
    Differential Revision: D31102027
    
    fbshipit-source-id: dee7333d77ebde25dcf18c6af72cc04e99788e43
    4a7ac66b
Hazptr-fwd.h 5.92 KB