mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-26 01:46:31 -05:00
_maybe_grow_on_pressure and the monitor hill-climber called thread_count() on every full-queue enqueue and every sample cycle, which under the hood locked _threads_mutex. Under sustained load that serialized producers against every scaling operation. Add _thread_count_atomic, maintained under _threads_mutex at each push_back/erase site (constructor, _add_thread_scaling_locked, _try_claim_and_remove_self, _try_remove_self_if_above). Switch thread_count() to an acquire-load of the mirror. Authoritative bound enforcement still lives inside _add/_remove_thread_scaling_locked where _threads.size() is read under the lock, so the approximation only affects the pre-lock hints that already expect staleness. |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||