Re: [PATCH] irq: simplify irq_im_handle_irq()

From: Thomas Gleixner
Date: Mon Jul 21 2025 - 11:44:41 EST


On Mon, Jul 21 2025 at 10:27, Yury Norov wrote:
> On Mon, Jul 21, 2025 at 04:07:22PM +0200, Thomas Gleixner wrote:
> find_next_bit() and for_each_bit() cannot be used in concurrent
> environment, and having atomic clear_bit() is meaningless here.
> Two concurrent processes, if running in parallel, may pick the
> same offset, ending up executing the handle_simple_irq() twice.

The irq work cannot be run in parallel on multiple CPUs. It's guaranteed
that only one irq work handler runs at a time. So irq_sim_handle_irq()
is fully serialized by the irq work magic.

But the bitmap can be modified concurrently, which is not a problem.

Thanks,

tglx