linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/cpupri: fix cpupri_find() for high priority tasks
@ 2014-04-09  3:50 Mike Galbraith
  2014-04-13 13:40 ` Steven Rostedt
  2014-05-08 10:41 ` [tip:sched/core] sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check tip-bot for Steven Rostedt (Red Hat)
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Galbraith @ 2014-04-09  3:50 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Peter Zijlstra, Ingo Molnar, LKML

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;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-08 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09  3:50 [PATCH] sched/cpupri: fix cpupri_find() for high priority tasks Mike Galbraith
2014-04-13 13:40 ` Steven Rostedt
2014-04-13 13:48   ` Steven Rostedt
2014-05-08 10:41 ` [tip:sched/core] sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check tip-bot for Steven Rostedt (Red Hat)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).