From 288d4b49e9853e8e2965e08d4eccd66ccca0c217 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Dec 2025 12:59:10 +0000 Subject: [PATCH] Skip backtrace in lsa-timing logs for preemptible reclaim Preemptible reclaim is only done from the background reclaimer, so backtrace is not useful. It's also normal that it takes a long time. Skip the backtrace when reclaim is preemptible to reduce log noise. Fixes the issue where background reclaim was printing unnecessary backtraces in lsa-timing logs when operations took longer than the stall detection threshold. Closes: #27692 Co-authored-by: tgrabiec <283695+tgrabiec@users.noreply.github.com> --- utils/logalloc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/logalloc.cc b/utils/logalloc.cc index 492fc1904b..b3a4c54226 100644 --- a/utils/logalloc.cc +++ b/utils/logalloc.cc @@ -1547,8 +1547,8 @@ void reclaim_timer::report() const noexcept { auto time_level = _stall_detected ? log_level::warn : log_level::debug; auto info_level = _stall_detected ? log_level::info : log_level::debug; auto MiB = 1024*1024; - auto msg_extra = extra_msg_when_stall_detected(_stall_detected, - _stall_detected ? current_backtrace() : saved_backtrace{}); + auto msg_extra = extra_msg_when_stall_detected(_stall_detected && !_preemptible, + (_stall_detected && !_preemptible) ? current_backtrace() : saved_backtrace{}); timing_logger.log(time_level, "{} took {} us, trying to release {:.3f} MiB {}preemptibly, reserve: {{goal: {}, max: {}}}{}", _name, (_duration + 500ns) / 1us, (float)_memory_to_release / MiB, _preemptible ? "" : "non-",