Skip to content

Commit

Permalink
Revert "softirq: Check preemption after reenabling interrupts" for ir…
Browse files Browse the repository at this point in the history
…q_poll

irq_poll_cpu_dead() defers its softirq processing until a random point.
This is true for RT & !RT.
The checks in irq_poll_softirq() are not needed because it is invoked
from within the softirq handler.
The check in irq_poll_complete() is not needed because there is no task
wake here.
The check in irq_poll_sched() should not be needed. Should as in all
handler should invoke it from their interrupt service routing. I'm not sure
about lpfc and mpt3sas due to long call chain but if it is invoked from a
preemptible context then it is delayed to random point in time with and without
PREEMPT_RT.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
  • Loading branch information
Sebastian Andrzej Siewior committed Sep 30, 2021
1 parent ce55c8d commit ab2154c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/irq_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ void irq_poll_sched(struct irq_poll *iop)
list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll));
raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
local_irq_restore(flags);
preempt_check_resched_rt();
}
EXPORT_SYMBOL(irq_poll_sched);

Expand Down Expand Up @@ -73,7 +72,6 @@ void irq_poll_complete(struct irq_poll *iop)
local_irq_save(flags);
__irq_poll_complete(iop);
local_irq_restore(flags);
preempt_check_resched_rt();
}
EXPORT_SYMBOL(irq_poll_complete);

Expand All @@ -98,7 +96,6 @@ static void __latent_entropy irq_poll_softirq(struct softirq_action *h)
}

local_irq_enable();
preempt_check_resched_rt();

/* Even though interrupts have been re-enabled, this
* access is safe because interrupts can only add new
Expand Down Expand Up @@ -136,7 +133,6 @@ static void __latent_entropy irq_poll_softirq(struct softirq_action *h)
__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);

local_irq_enable();
preempt_check_resched_rt();
}

/**
Expand Down Expand Up @@ -200,7 +196,6 @@ static int irq_poll_cpu_dead(unsigned int cpu)
this_cpu_ptr(&blk_cpu_iopoll));
__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
local_irq_enable();
preempt_check_resched_rt();

return 0;
}
Expand Down

0 comments on commit ab2154c

Please sign in to comment.