aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-09-01 04:34:37 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-04 04:09:55 -0400
commite9e9250bc78e7f6342517214c0178a529807964b (patch)
tree9466a437ccfa93b200f4ee434fe807dd6b5fc050 /kernel/sched_rt.c
parentab29230e673c646292c90c8b9d378b9562145af0 (diff)
sched: Scale down cpu_power due to RT tasks
Keep an average on the amount of time spend on RT tasks and use that fraction to scale down the cpu_power for regular tasks. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Tested-by: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Gautham R Shenoy <ego@in.ibm.com> Cc: Balbir Singh <balbir@in.ibm.com> LKML-Reference: <20090901083826.287778431@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 3d4020a9ba1b..2eb4bd6a526c 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -615,6 +615,8 @@ static void update_curr_rt(struct rq *rq)
615 curr->se.exec_start = rq->clock; 615 curr->se.exec_start = rq->clock;
616 cpuacct_charge(curr, delta_exec); 616 cpuacct_charge(curr, delta_exec);
617 617
618 sched_rt_avg_update(rq, delta_exec);
619
618 if (!rt_bandwidth_enabled()) 620 if (!rt_bandwidth_enabled())
619 return; 621 return;
620 622
@@ -887,8 +889,6 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup)
887 889
888 if (!task_current(rq, p) && p->rt.nr_cpus_allowed > 1) 890 if (!task_current(rq, p) && p->rt.nr_cpus_allowed > 1)
889 enqueue_pushable_task(rq, p); 891 enqueue_pushable_task(rq, p);
890
891 inc_cpu_load(rq, p->se.load.weight);
892} 892}
893 893
894static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) 894static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep)
@@ -899,8 +899,6 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep)
899 dequeue_rt_entity(rt_se); 899 dequeue_rt_entity(rt_se);
900 900
901 dequeue_pushable_task(rq, p); 901 dequeue_pushable_task(rq, p);
902
903 dec_cpu_load(rq, p->se.load.weight);
904} 902}
905 903
906/* 904/*