From: Matt Turner <mattst88@gmail.com>
To: Magnus Lindholm <linmag7@gmail.com>
Cc: richard.henderson@linaro.org, linux-kernel@vger.kernel.org,
linux-alpha@vger.kernel.org
Subject: Re: [PATCH v2 1/1] alpha/perf: Account for time spent handling PMU interrupts
Date: Tue, 10 Nov 2026 16:27:37 -0500 [thread overview]
Message-ID: <CAEdQ38GVjPFJAea1oM_SX4hH2ER2zDiyojE6VdXRFFNWkvvwXw@mail.gmail.com> (raw)
In-Reply-To: <20261110193134.1151112-2-linmag7@gmail.com>
On Tue, Nov 10, 2026 at 2:31 PM Magnus Lindholm <linmag7@gmail.com> wrote:
> Alpha does not report PMU interrupt duration to perf, preventing its
> adaptive throttling from reducing an excessively costly sampling rate.
> Short sampling periods can leave the machine unresponsive with RCU
> grace-period kthread starvation reports.
[snip]
> #include <asm/hwrpb.h>
> +#include <asm/timex.h>
<linux/timex.h> is the usual include for get_cycles(), though it makes
no practical difference here.
[snip]
> @@ -862,11 +869,28 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
>
>
>
> +/* sched_clock() is tick-based on Alpha; measure a short same-CPU interval. */
> +static void alpha_perf_event_irq_handler(unsigned long la_ptr,
> + struct pt_regs *regs)
Since you're touching this spot anyway, you could drop two of the three
blank lines above the new function.
Neither of these needs a respin. If you end up sending a v3 for some
other reason, feel free to fold them in.
The mult/shift version looks good. cycles_t is 32 bits, so the
subtraction is fine across a wrap, and init_hw_perf_events() runs well
after time_init() has settled est_cycle_freq. I built it here with W=1
and got no warnings, and the handler has no divide in it.
Thanks!
prev parent reply other threads:[~2026-11-10 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 19:31 [PATCH v2 0/1] alpha/perf: Enable duration-based sampling throttling Magnus Lindholm
2026-11-10 19:31 ` [PATCH v2 1/1] alpha/perf: Account for time spent handling PMU interrupts Magnus Lindholm
2026-11-10 21:27 ` Matt Turner [this message]
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=CAEdQ38GVjPFJAea1oM_SX4hH2ER2zDiyojE6VdXRFFNWkvvwXw@mail.gmail.com \
--to=mattst88@gmail.com \
--cc=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.henderson@linaro.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
all inboxes | Powered by JetHome®