Re: [RFC][PATCH 09/14] genirq: add irq_kmemdump_register
From: Eugen Hristev <hidden>
Date: 2025-05-07 10:27:58
Also in:
linux-arm-msm, linux-doc, lkml
From: Eugen Hristev <hidden>
Date: 2025-05-07 10:27:58
Also in:
linux-arm-msm, linux-doc, lkml
On 5/7/25 13:18, Thomas Gleixner wrote:
$Subject: ... See https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-submission-notes On Tue, Apr 22 2025 at 14:31, Eugen Hristev wrote:quoted
Add function to register irq info into kmemdump.What is irq info? Please explain explicitly which information is exposed and why.quoted
+void irq_kmemdump_register(void) +{ + kmemdump_register("irq", (void *)&nr_irqs, sizeof(nr_irqs)); +} +EXPORT_SYMBOL_GPL(irq_kmemdump_register);Are you going to slap a gazillion of those register a single variable functions all over the place? That's a really horrible idea. The obvious way to deal with that is to annotate the variable: static unsigned int nr_irqs = NR_IRQS; KMEMDUMP_VAR(nr_irqs); Let KMEMDUMP_VAR() store the size and the address of 'nr_irqs' in a kmemdump specific section and then kmemdump can just walk that section and dump stuff. No magic register functions and no extra storage management for static/global variables. No?
Thank you very much for your review ! I will try it out. Eugen
Thanks,
tglx