Re: preemption when running in the kernel

From: Robert Love
Date: Sat Nov 08 2003 - 19:23:57 EST


On Sat, 2003-11-08 at 08:01, Ingo Oeser wrote:

> While having preemption disabled or while actually holding a spinlock,
> preemption is disabled.
>
> Disabling preemption is modifying a count, which must reach 0 again to
> have preemption enabled and trigger an reschedule, if needed.
>
> Think of it roughly as a "counter of reasons to not preempt". If there
> are no reasons anymore, then we preempt.

Hi, Ingo.

This is an accurate description of 2.6, but Frank said for 2.4.

So, Frank, this is correct for 2.6 or 2.4 with the preempt-kernel patch,
but not a stock 2.4 kernel. A stock 2.4 kernel will never preempt a
task running inside the kernel.

Robert Love


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/