mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] tools/power turbostat: Fix segfault and restart loop issues
@ 2025-11-18 15:58 David Arcari
  2025-11-18 15:58 ` [PATCH 1/3] tools/power turbostat: avoid segfault referencing fd_instr_count_percpu David Arcari
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: David Arcari @ 2025-11-18 15:58 UTC (permalink / raw)
  To: lenb; +Cc: linux-pm, linux-kernel, David Arcari

This patch series addresses three stability issues found in turbostat,
primarily affecting virtualized environments where specific hardware
counters (like APERF) or MSR access may be restricted or inconsistent.

Patch 1 fixes a segmentation fault caused by referencing a NULL
fd_instr_count_percpu pointer. This occurs on systems where has_aperf
is 0 (preventing allocation), but has_aperf_access is 1 (allowing the
function call).

Patch 2 prevents an infinite loop when turbostat attempts to restart.
It ensures the restart limit is checked in all error paths and removes
logic that incorrectly reset the retry counter.

Patch 3 allows turbostat to proceed gracefully when APERF is unavailable.
Previously, the missing counter caused delta_thread() to error out,
triggering the restart mechanism.


David Arcari (3):
  tools/power turbostat: avoid segfault referencing
    fd_instr_count_percpu
  tools/power turbostat: avoid an infinite loop of restarts
  tools/power turbostat: allow turbostat to work when aperf is not
    available

 tools/power/x86/turbostat/turbostat.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-12-02 15:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-18 15:58 [PATCH 0/3] tools/power turbostat: Fix segfault and restart loop issues David Arcari
2025-11-18 15:58 ` [PATCH 1/3] tools/power turbostat: avoid segfault referencing fd_instr_count_percpu David Arcari
2025-11-25 19:11   ` Len Brown
2025-12-01 14:13     ` David Arcari
2025-11-18 15:58 ` [PATCH 2/3] tools/power turbostat: avoid an infinite loop of restarts David Arcari
2025-11-25 19:12   ` Len Brown
2025-11-25 21:50     ` David Arcari
2025-11-27 17:45       ` Len Brown
2025-12-01 12:18         ` David Arcari
2025-11-18 15:58 ` [PATCH 3/3] tools/power turbostat: allow turbostat to work when aperf is not available David Arcari
2025-11-25 19:14   ` Len Brown
2025-11-25 21:55     ` David Arcari
2025-12-01 15:13       ` David Arcari
2025-12-01 19:53         ` Len Brown
2025-12-01 20:11           ` Len Brown
2025-12-02 12:55             ` David Arcari
2025-12-02 15:02               ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®