Re: [PATCH 2/6] genirq: soft_moderation: add base files, procfs hooks
From: Thomas Gleixner
Date: Thu Nov 13 2025 - 05:25:00 EST
On Thu, Nov 13 2025 at 10:29, Thomas Gleixner wrote:
> On Wed, Nov 12 2025 at 19:24, Luigi Rizzo wrote:
>> +static void set_moderation_mode(struct irq_desc *desc, bool mode)
>> +{
>> + if (desc) {
>
> Why would desc be NULL?
>
>> + struct irq_chip *chip = desc->irq_data.chip;
>> +
>> + /* Make sure this is msi and we can run enable_irq from irq context */
>> + mode &= desc->handle_irq == handle_edge_irq && chip && chip->irq_bus_lock == NULL &&
>> + chip->irq_bus_sync_unlock == NULL;
Q: How does this make sure that it is MSI?
A: Not at all
Q: How is this protected against concurrent modification?
A: Not at all
>> + if (mode != desc->moderation_mode)
>> + desc->moderation_mode = mode;
This conditional is truly making a difference.
Thanks
tglx