Messages in this thread | | | Date | Wed, 8 Dec 2004 09:26:33 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH, RFC] protect call to set_tsk_need_resched() by the rq-lock |
| |
* Michael Buesch <mbuesch@freenet.de> wrote:
> > > The two attached patches (one against vanilla kernel and one > > > against ck patchset) moves the rq-lock a few lines up in > > > scheduler_tick() to also protect set_tsk_need_resched(). > > > > > > Is that neccessary? > > > > scheduler_tick() is a special case, 'current' is pinned and cannot > > go away, nor can it get off the runqueue. > > Can you explain in short, why this is the case, please? I don't really > get behind it. How are the two things enforced?
'current' is the currently executing task and as such it wont get moved off the runqueue. The only way to leave the runqueue is to execute schedule() [or to be preempted].
Ingo - 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/
| |