Re: [PATCH] preemptive kernel behavior change: don't be rude

Robert Love (rml@tech9.net)
04 Apr 2002 21:06:29 -0500


On Thu, 2002-04-04 at 20:51, george anzinger wrote:

> This line implies that entry.S calls with preempt count of 0. It use to
> call with 1 or was that WAY back there?

No you are right, this line needs to be pushed back out to
preempt_enable OR we need to duplicate preempt_schedule in the entry.S
code. For now, I will just push this back into preempt_enable.

> If this is the way it is and it works, then the += and -= below can be
> changed to = and the second reference to PREEMPT_ACTIVE becomes 0.
>
> I think I would rather have entry.S set preempt_count to PREEMPT_ACTIVE
> with the interrupt system off, turn it on, make the call directly to
> schedule(), and then set to zero on return. I really am concerned with
> taking an interrupt during the call, i.e. between the interrupt on and
> the store below. This can lead to stack overflow rather easily.

Agreed. This is probably the best way to do it ... for now I'll do it
like above.

Robert Love

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