x86-32: Unpreemptible return from __ipipe_handle_irq
Hi Philippe,
__ipipe_handle_irq:
#if defined(CONFIG_X86_32) && defined(CONFIG_SMP) /* * Prevent a spurious rescheduling from being triggered on * preemptible kernels along the way out through * ret_from_intr. */ if ((long)regs->orig_ax < 0) __set_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status));
#endif /* CONFIG_SMP */
But this defeats any preemption of kernel contexts on CONFIG_PREEMPT, doesn't it? __ipipe_test_preemption should now always fail.
What kind of spurious rescheduling has to be prevented?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 12 lines · Jan Kiszka
Hi Philippe,
__ipipe_handle_irq:#if defined(CONFIG_X86_32) && defined(CONFIG_SMP) /* * Prevent a spurious rescheduling from being triggered on * preemptible kernels along the way out through * ret_from_intr. */ if ((long)regs->orig_ax < 0) __set_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status));
Quoted 6 lines
#endif /*
CONFIG_SMP*/But this defeats any preemption of kernel contexts on
CONFIG_PREEMPT, doesn't it?__ipipe_test_preemptionshould now always fail.What kind of spurious rescheduling has to be prevented?
This hack was introduced in 2.6.9; disabling preemption on the IRQ return path was working around a SMP issue causing a crash. I would not be surprised if such code was only papering over a migration issue in fact, which probably disappeared later in the pipeline implementation. x86_64 never required this, and it is likely time to re-assess the need for this hack, and fix the issue properly if ever it still makes sense.
Quoted 3 lines
Jan
Signature · 1 line
Philippe.