Re: 2.5.40-mm2

From: Robert Love (rml@tech9.net)
Date: Sun Oct 06 2002 - 17:38:05 EST


On Sun, 2002-10-06 at 18:33, Andrew Morton wrote:

> I think it's a way of doing "cond_resched() if cond_resched() is
> a legal thing to do right now".
>
> I'm sure David isn't using preempt though.

If the system is preemptible, then the call can be replaced with
preempt_check_resched() which avoids the unneeded inc and dec.

But if the system is preemptible, it probably does not accomplish much
because we will already have preempted (e.g. the interrupt handler that
woke up a new task set need_resched and on return from interrupt we
serviced it).

If the system is not preemptible (non-zero preempt_count here) this
accomplishes nothing.

        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/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:56 EST