diff --git a/kernel/sched.c b/kernel/sched.c index f55ce5adac55212d8bf154e1abee7232125ad687..589e55a42214bd527f78ea3e9367c396bae30f05 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1273,18 +1273,18 @@ static int try_to_wake_up(task_t *p, unsigned int state, int sync) * sleep_avg beyond just interactive state. */ p->sleep_type = SLEEP_NONINTERACTIVE; - } + } else /* * Tasks that have marked their sleep as noninteractive get - * woken up without updating their sleep average. (i.e. their - * sleep is handled in a priority-neutral manner, no priority - * boost and no penalty.) + * woken up with their sleep average not weighted in an + * interactive way. */ - if (old_state & TASK_NONINTERACTIVE) - __activate_task(p, rq); - else - activate_task(p, rq, cpu == this_cpu); + if (old_state & TASK_NONINTERACTIVE) + p->sleep_type = SLEEP_NONINTERACTIVE; + + + activate_task(p, rq, cpu == this_cpu); /* * Sync wakeups (i.e. those types of wakeups where the waker * has indicated that it will leave the CPU in short order)