Re: [patch] setscheduler fix

From: Joe Korty (joe.korty@ccur.com)
Date: Thu Jun 19 2003 - 13:20:57 EST


> Here is my patch. It is the same idea as Joe's. Is there a better fix?
>
> Basically, the problem is that setscheduler() does not set need_resched
> when needed. There are two basic cases where this is needed:
>
> - the task is running, but now it is no longer the highest
> priority task on the rq
> - the task is not running, but now it is the highest
> priority task on the rq
>
> In either case, we need to set need_resched to invoke the scheduler.
>
> Patch is against 2.5.72. Comments?

Looks good to me.

migration_thread and try_to_wake_up already have a simplier version of
your test that seems to be correct for that environment, so no change
is needed there.

wake_up_forked_process in principle might need your patch, but as it
appears to be called only from boot code it is unimportant that it
have the lowest possible latency, so no change is needed there either.

Joe
-
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 Jun 23 2003 - 22:00:30 EST