From: Peter Zijlstra <peterz@infradead.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>,
Thomas Gleixner <tglx@kernel.org>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>,
Johan Hovold <johan@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Jiayuan Chen <jiayuan.chen@linux.dev>,
"Steven Rostedt (Google)" <rostedt@goodmis.org>,
"Vineeth Pillai (Google)" <vineeth@bitbyteword.org>,
Frederic Weisbecker <frederic@kernel.org>,
Andi Kleen <ak@linux.intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, driver-core@lists.linux.dev
Subject: Re: [PATCH 1/6] irq_work: Re-raise pending irq_work after system resume
Date: Mon, 2 Nov 2026 10:06:04 +0100 [thread overview]
Message-ID: <20261102090604.GR1779021@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20261102074039.26983-2-adrian.hunter@intel.com>
On Mon, Nov 02, 2026 at 09:40:34AM +0200, Adrian Hunter wrote:
> irq_work_queue() raises the irq_work self-interrupt only when adding
> work to an empty raised_list. Once raised_list is non-empty, further
> queueing assumes the interrupt is already pending and will eventually
> process the list.
>
> That assumption can fail across system suspend. irq_work queued after
> arch_suspend_disable_irqs() and before the interrupt controller is
> suspended, for example from NMI context, may leave its self-interrupt
> pending in hardware. If that pending interrupt state is lost during
> suspend, hibernation restore, or kexec jump, raised_list remains
> non-empty after resume but nothing will process it.
>
> Subsequent irq_work added to raised_list will not raise another
> interrupt because the list is already non-empty. Architectures that use
> an irq_work interrupt and do not process raised_list from the tick can
> therefore leave irq_work pending indefinitely. A caller waiting in
> irq_work_sync() may then spin forever, for example when closing a perf
> event whose pending irq_work never executes.
>
> For suspend, hibernation, and kexec jump, only the CPU that remains
> online is affected. The other CPUs are taken offline beforehand, and
> smpcfd_dying_cpu() runs irq_work_run() on each CPU before it is removed,
> so checking the local raised_list is sufficient.
I thought here was a suspend2idle option where all the CPUs remain
online?
Anyway, I'm torn; I would much rather make this trigger a WARN and have
suspend pause/resume perf in a more controlled manner. Also, ISTR there
being hooks in kexec, but I can't seem to find them :/
next prev parent reply other threads:[~2026-11-02 9:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:40 [PATCH 0/6] perf/x86/intel/pt: Fix tracing across kexec, kdump and suspend Adrian Hunter
2026-11-02 7:40 ` [PATCH 1/6] irq_work: Re-raise pending irq_work after system resume Adrian Hunter
2026-11-02 7:51 ` sashiko-bot
2026-11-02 9:06 ` Peter Zijlstra [this message]
2026-11-02 10:54 ` Adrian Hunter
2026-11-02 16:39 ` Sebastian Andrzej Siewior
2026-11-02 7:40 ` [PATCH 2/6] perf/x86/intel/pt: Stop tracing if VMXON has not yet happened Adrian Hunter
2026-11-02 7:59 ` sashiko-bot
2026-11-02 9:57 ` Peter Zijlstra
2026-11-02 11:04 ` Adrian Hunter
2026-11-02 11:07 ` Peter Zijlstra
2026-11-02 7:40 ` [PATCH 3/6] perf/x86/intel/pt: Stop tracing at syscore shutdown Adrian Hunter
2026-11-02 8:05 ` sashiko-bot
2026-11-02 10:04 ` Peter Zijlstra
2026-11-02 10:23 ` Adrian Hunter
2026-11-02 11:01 ` Peter Zijlstra
2026-11-02 16:15 ` Andi Kleen
2026-11-02 16:27 ` Adrian Hunter
2026-11-02 17:45 ` Andi Kleen
2026-11-02 18:13 ` Adrian Hunter
2026-11-02 7:40 ` [PATCH 4/6] perf/x86/intel/pt: Clear TraceEn in hardware in cpu_emergency_stop_pt() Adrian Hunter
2026-11-02 8:21 ` sashiko-bot
2026-11-02 10:07 ` Peter Zijlstra
2026-11-02 18:41 ` Adrian Hunter
2026-11-02 7:40 ` [PATCH 5/6] perf/x86/intel/pt: Reset stale MSR state on CPU start and resume Adrian Hunter
2026-11-02 8:31 ` sashiko-bot
2026-11-02 7:40 ` [PATCH 6/6] perf/x86/intel/pt: Stop tracing across system suspend Adrian Hunter
2026-11-02 8:59 ` sashiko-bot
2026-11-02 10:10 ` [PATCH 0/6] perf/x86/intel/pt: Fix tracing across kexec, kdump and suspend Peter Zijlstra
2026-11-02 12:22 ` Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102090604.GR1779021@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dakr@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=driver-core@lists.linux.dev \
--cc=frederic@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jiayuan.chen@linux.dev \
--cc=johan@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@kernel.org \
--cc=vineeth@bitbyteword.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox