mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-24 17:06:24 -05:00
tasks_pending() loads _tasks_completed then _tasks_enqueued and returns the delta. The bias-toward-zero property (safe for scaling heuristics) depends on completed being observed no later than enqueued. With relaxed ordering on both loads, a weakly-ordered CPU (ARM, POWER) can reorder the enqueued load before the completed load, potentially observing a stale (lower) completed with a fresh (higher) enqueued — over-reporting pending work. Use acquire on the first load (_tasks_completed) so that subsequent loads in program order cannot be reordered before it. On x86 (TSO) this compiles to the same instruction as relaxed, so there is zero overhead on the primary target architecture. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||