Re: [PATCH, RFC] protect call to set_tsk_need_resched() by the rq-lock

From: Ingo Molnar
Date: Wed Dec 08 2004 - 06:17:26 EST



* Michael Buesch <mbuesch@xxxxxxxxxx> wrote:

> Someone else said to me:
> [quote]
> "another runqueue might want to touch your runqueue
> while you're in scheduler_tick" ...
> "that is far more likely to hit with many many cpus and I'd
> be surprised if you're the first person to get a race there"
> [/quote]
>
> What about this? Is this possible? Or did she/he/it miss a point?

it might touch the runqueue but it wont move _your task_ off from under
you. So setting need_resched of the current task is perfectly fine.

Ingo
-
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/