[<prev] [next>] [day] [month] [year] [list]
Message-Id: <3d53eba431b0afc691a4.1253671436@mudlark.pw.nest>
Date: Wed, 23 Sep 2009 02:03:56 -0000
From: Peter Williams <pwil3058@...pond.net.au>
To: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Mike Galbraith <efault@....de>,
Linux Kernel Mailing <linux-kernel@...r.kernel.org>
Subject: [PATCH] sched: Make sure task has correct sched_class after policy
change
>From the code in rt_mutex_setprio(), it is evident that the intention
is that task's with a RT 'prio' value as a consequence of receiving a PI
boost also have their 'sched_class' field set to '&rt_sched_class'.
However, the code in __setscheduler() could result in this intention
being frustrated.
This patch fixes this problem.
Signed-off-by: Peter Williams <pwil3058@...pond.net.au>
diff --git a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6159,6 +6159,8 @@ __setscheduler(struct rq *rq, struct tas
p->normal_prio = normal_prio(p);
/* we are holding p->pi_lock already */
p->prio = rt_mutex_getprio(p);
+ if (rt_prio(prio))
+ p->sched_class = &rt_sched_class;
set_load_weight(p);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists