Can interrupt be missed between interrupt disable/enable window?

Chetan Nanda chetannanda at gmail.com
Mon Mar 21 04:14:35 EDT 2016


On Mon, Mar 21, 2016 at 12:41 PM, Vishwas Srivastava
<vishu.kernel at gmail.com> wrote:
> Kernel code heavily uses the spinlock primitives
> spin_lock_irqsave/restore plus local interrupt disabling/ enabling, all
> across the code.
> Is there a possibility that the interrupts might get
> missed in this small window
>
> disable interrupts
> .............
> .............                        <<<<<<<<<<<----------------------
> interrupts is trigerred here
>
> enable interrupts
>

As per my understanding, During disable period interrupt delivery to a
local core is disabled.
So, when interrupts are enabled (for that core) again then interrupt
will be delivered to that core .So no interrupt missed.

But if there are multiple interrupt from same source during the
disabled period then core will be interrupted once after interrupts
enabled again, i.e. all interrupt except one are missed by core,

Thanks,
Chetan Nanda

>
> specially when the irq
> affinity has been set to the same core on which the
> above mentioned code (disabling / enabling the irq's)
> runs?
> How the linux deals with this kind of scenario?
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



More information about the Kernelnewbies mailing list