]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
sched: redundant reschedule when set_user_nice() boosts a prio of a task from the...
authorDmitry Adamushko <dmitry.adamushko@gmail.com>
Tue, 8 May 2007 07:33:06 +0000 (00:33 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:17 +0000 (11:15 -0700)
commitbd53f96ca54a21c07e7a0ae1886fa623d370b85f
treec908772406a055fcaa8a8742a36f61014a99b20a
parent4953198b6ce07b008b0f1c2edd41c9d027a118b4
sched: redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array

- Make TASK_PREEMPTS_CURR(task, rq) return "true" only if the task's prio
  is higher than the current's one and the task is in the "active" array.
  This ensures we don't make redundant resched_task() calls when the task
  is in the "expired" array (as may happen now in set_user_prio(),
  rt_mutex_setprio() and pull_task() ) ;

- generalise conditions for a call to resched_task() in set_user_nice(),
  rt_mutex_setprio() and sched_setscheduler()

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sched.c