Will a system call interrupt a softirq?
Per my understanding, a system call is serviced when a software interrupt is triggered, so I think it can't interrupt a hardware ISR because local CPU irq is disabled inside ISR, but it looks possible to interrupt any other tasks, like softirq, tasklet, work queue and kernel thread?
In general, we don't need to worry about the contention against lower priority kernel tasks in a higher priority task. Like we don't need to protect data against kernel thread in a tasklet or softirq since preemption is disabled.
While a system call is running in the process context of kernel mode, if it can interrupt a softirq, we have to take a proper protection into account in the softirq against processes. And worse, a heavy load system call can delay the execution of softirqs and tasklets for at least one tick or untill another hardware interrupt comes and kernel schedules them again.
Please correct me if my understanding is wrong.
You're overthinking this.
A system call has to be made by a userspace application that's currently running.
If a CPU is busy servicing an IRQ, it's not running a userspace application, so a system call can't occur on that CPU.
链接地址: http://www.djcxy.com/p/84892.html上一篇: 为什么在sys中显式调用schedule
下一篇: 系统调用会中断softirq吗?