I am reading Linux Kernel Development recently, and I have a few questions related to disabling preemption.
In the \"Interrupt Control\" section of
I am not a scheduler guru, but I would like to explain how I see it. Here are several things.
thread_info->preempt_count variable.You can see what is preempt_disable(). Try this: 1. Get a spinlock. 2. Call schedule()
In the dmesg you will see something like "BUG: scheduling while atomic". This happens when scheduler detects that your process in atomic (not preemptive) context but it schedules itself.
Good luck.