ISR线程获得与ISR例程相同的关联,因此在抢占的情况下,ISR线程将不会重新调度到任意CPU.
此外,根据您提供的链接中的信息,默认情况下不会启用强制ISR成为线程的行为.它受threadirqs命令行选项的限制.命令行选项的处理以传统ISR不需要关心重新安排的方式处理ISR线程.根据kernel / irq / manage.c中的以下代码,对这些线程禁用抢占:
/*
* Interrupts which are not explicitely requested as threaded
* interrupts rely on the implicit bh/preempt disable of the hard irq
* context. So we need to disable bh here to avoid deadlocks and other
* side effects.
*/
static void
irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)
{
local_bh_disable();
action->thread_fn(action->irq, action->dev_id);
irq_finalize_oneshot(desc, action, false);
local_bh_enable();
}