• Lu Pan's avatar
    set max deferred readers for folly::SharedMutex dynamically · 1ad7426b
    Lu Pan authored
    Summary: Instead of hard coding the max deferred readers allowed to be 64, statically allocate large enough slots and pick max deferred readers allowed dynamically based on the platform running the service. Specifically, we set the `maxDeferredReaders = 2 * nextPowTwo(numCPU)`, which four times the number of physical cores, to allow faster reads. We are effectively giving each HW thread two slots.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D22407478
    
    fbshipit-source-id: 4001cf96dc502e00f00a27d57c63ba0028a52671
    1ad7426b
SharedMutex.h 64.7 KB