Skip to contentSkip to conversation

sched/core: Use TASK_USER_PRIO macro in set_load_weight()

PATCH New Kamalesh Babulal 1 participant 1 message Feb 11, 2014 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/core: Use TASK_USER_PRIO macro in set_load_weight()

Use TASK_USER_PRIO macro, instead of handcoding priority to set load weight.

---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
index 104c8164e04f..5f1c24bc453a 100644
@@ -742,7 +742,7 @@ int tg_nop(struct task_group *tg, void *data)
 
 static void set_load_weight(struct task_struct *p)
 {
-	int prio = p->static_prio - MAX_RT_PRIO;
+	int prio = TASK_USER_PRIO(p);
 	struct load_weight *load = &p->se.load;
 
 	/*
Signature · 1 line
1.8.4.474.g128a96c