Messages in this thread Patch in this message | | | Subject | [PATCH] sched/cpupri: fix cpupri_find() for high priority tasks | From | Mike Galbraith <> | Date | Wed, 09 Apr 2014 05:50:10 +0200 |
| |
Hi Steven,
Seems c92211d9b7727 introduced a buglet.
--snip--
Bail on task_pri >= MAX_RT_PRIO excludes userspace prio 98 and 99 tasks, which map to 100 and 101 respectively.
A user reported that given two SCHED_RR tasks, one hog, one light, the light task may be stacked on top of the hog iff prio >= 98, latency hit follows.
Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Cc: <stable@vger.kernel.org> Fixes: c92211d9b7727 sched/cpupri: Remove the vec->lock --- kernel/sched/cpupri.c | 3 --- 1 file changed, 3 deletions(-)
--- a/kernel/sched/cpupri.c +++ b/kernel/sched/cpupri.c @@ -70,9 +70,6 @@ int cpupri_find(struct cpupri *cp, struc int idx = 0; int task_pri = convert_prio(p->prio); - if (task_pri >= MAX_RT_PRIO) - return 0; - for (idx = 0; idx < task_pri; idx++) { struct cpupri_vec *vec = &cp->pri_to_cpu[idx]; int skip = 0;
| |