set max deferred readers for folly::SharedMutex dynamically
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
Showing
Please register or sign in to comment