mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-29 03:16:56 -05:00
The pre-lock cooldown check used a stale _last_scale_time_usecs read. If another thread (monitor hill-climb, concurrent enqueue) updated the timestamp between the pre-lock check and the lock acquisition, the function would proceed to acquire _scaling_mutex and contend unnecessarily. The CAS that followed would correctly reject the stale value, so this was not a correctness bug, but it caused avoidable lock contention on the hot enqueue path. Add an authoritative cooldown re-check after acquiring _scaling_mutex with a fresh timestamp read. Replace the CAS with a plain store since the _scaling_mutex already serializes writers. Keep the pre-lock speculative check as a fast-path filter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||