[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240708115415.GA11771@willie-the-truck>
Date: Mon, 8 Jul 2024 12:54:15 +0100
From: Will Deacon <will@...nel.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>, catalin.marinas@....com
Cc: mark.rutland@....com, dianders@...omium.org, swboyd@...omium.org,
sumit.garg@...aro.org, frederic@...nel.org,
scott@...amperecomputing.com, misono.tomohiro@...itsu.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND v2] arm64: smp: Fix missing IPI statistics
On Thu, Jun 20, 2024 at 02:36:00PM +0800, Jinjie Ruan wrote:
> commit 83cfac95c018 ("genirq: Allow interrupts to be excluded from
> /proc/interrupts") is to avoid IPIs appear twice in /proc/interrupts.
> But the commit 331a1b3a836c ("arm64: smp: Add arch support for backtrace
> using pseudo-NMI") and commit 2f5cd0c7ffde("arm64: kgdb: Implement
> kgdb_roundup_cpus() to enable pseudo-NMI roundup") set CPU_BACKTRACE and
> KGDB_ROUNDUP IPIs "IRQ_HIDDEN" flag but not show them in
> arch_show_interrupts(), which cause the interrupt kstat_irqs accounting
> is missing in display.
[...]
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 31c8b3094dd7..5de85dccc09c 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -767,13 +767,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> }
> }
>
> -static const char *ipi_types[NR_IPI] __tracepoint_string = {
> +static const char *ipi_types[MAX_IPI] __tracepoint_string = {
> [IPI_RESCHEDULE] = "Rescheduling interrupts",
> [IPI_CALL_FUNC] = "Function call interrupts",
> [IPI_CPU_STOP] = "CPU stop interrupts",
> [IPI_CPU_CRASH_STOP] = "CPU stop (for crash dump) interrupts",
> [IPI_TIMER] = "Timer broadcast interrupts",
> [IPI_IRQ_WORK] = "IRQ work interrupts",
> + [IPI_CPU_BACKTRACE] = "CPU backtrace interrupts",
> + [IPI_KGDB_ROUNDUP] = "KGDB roundup interrupts",
> };
>
> static void smp_cross_call(const struct cpumask *target, unsigned int ipinr);
> @@ -784,7 +786,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
> {
> unsigned int cpu, i;
>
> - for (i = 0; i < NR_IPI; i++) {
> + for (i = 0; i < MAX_IPI; i++) {
> seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i,
> prec >= 4 ? " " : "");
> for_each_online_cpu(cpu)
> --
> 2.34.1
Acked-by: Will Deacon <will@...nel.org>
Will
Powered by blists - more mailing lists