diff --git a/vendored/libfuse/include/thread_pool.hpp b/vendored/libfuse/include/thread_pool.hpp index ff4aad14..292f7f5b 100644 --- a/vendored/libfuse/include/thread_pool.hpp +++ b/vendored/libfuse/include/thread_pool.hpp @@ -584,11 +584,14 @@ ThreadPool::monitor_routine(void *arg_) // Only adjust if there's meaningful work happening. // Reset direction to +1 (bias toward growth) so a stale // shrink direction from before the idle period doesn't - // penalize the pool when work resumes. + // penalize the pool when work resumes. Also reset warmup + // so the EMA re-seeds from fresh samples rather than + // comparing against a stale pre-idle value. if(ema_throughput < 0.5 && prev_ema < 0.5) { decline_streak = 0; direction = 1; + warmup_samples = 0; continue; }