Re: [PATCH v2 2/8] genirq: soft_moderation: add base files, procfs

From: Thomas Gleixner
Date: Mon Nov 17 2025 - 14:36:44 EST


On Mon, Nov 17 2025 at 17:16, Luigi Rizzo wrote:
> On Mon, Nov 17, 2025 at 5:01 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>> > +static int __init init_irq_moderation(void)
>> > +{
>> > + uint *cur;
>> > +
>> > + on_each_cpu(irq_moderation_percpu_init, NULL, 1);
>>
>> That's pointless. Register the hotplug callback without 'nocalls' and
>> let the hotplug code handle it.
>
> Sounds good. I have a question on event ordering.
> Which event should I use to make sure the callback runs
> before interrupts are enabled on the new CPU ?

See include/linux/cpuhotplug.h

But see my other reply.

>> > ...
>> I asked you last time already to follow the TIP tree documentation, no?
>>
>> > + uint target_irq_rate;
>> > + uint hardirq_percent;
>> > + uint timer_rounds;
>> > + uint update_ms;
>> > + uint scale_cpus;
>> > + uint count_timer_calls;
>> > + uint count_msi_calls;
>> > + uint decay_factor;
>> > + uint grow_factor;
>> > + uint pad[];
>> > +};
>>
>> And again you decided to add these fat data structures all in once with
>> no usage. I told you last time that this is unreviewable and that stuff
>> should be introduced gradually with the usage.
>
> Ok, will do.
> FWIW my goal was to get the telemetry functions in the first patch, and reduce
> the clutter in subsequent patches, since each new field would create many
> chunks (docstring, struct field, init, print format and value).

TBH, I'm not convinced at all that you need all of this telemetry maze.

That looks pretty overengineered and that can be added on top of a
functional and reviewable base implementation.

Thanks,

tglx