On Sat, 20 Dec 2003, Ingo Molnar wrote:
i'd prefer the much simpler patch below. This also keeps the kernel
preemption logic isolated instead of mixing it into the normal path.
That patch still gets several cases wrong: we don't update any counters at
all for the case where we were TASK_INTERRUPTIBLE and we got made
TASK_RUNNING because of having a signal pending.
Also, we shouldn't update the context switch counter just because we entered the scheduler. If we don't actually end up switching to anything else, it shouldn't count as a context switch.
So how about something like this?
Totally untested. Comments?