* [RFC][PATCH -rt] sched: fully ignore RT tasks for CFS load-balancing
@ 2009-08-26 14:44 Peter Zijlstra
2009-08-26 18:52 ` Darren Hart
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2009-08-26 14:44 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar; +Cc: linux-kernel
Since -rt runs IRQs and SoftIRQs as RT tasks and load-balancing is done
from softirq context, there is always at least one RT task (and very
likely multiple) running when we balance.
The current (and totally broken) interaction between RT tasks and CFS
load-balancing makes it so that we'll try to evacuate a significant
amount of tasks due to RT tasks being runnable.
Solve this in another broken way by not accounting RT tasks at all.
This will likely break another class of cases, but until we can properly
fix this, we might as well do this.
Chucked-on-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
kernel/sched_rt.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index adcbc68..385d31f 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -926,8 +926,6 @@ static void enqueue_task_rt(struct rq *rq, struct
task_struct *p, int wakeup)
if (!task_current(rq, p) && p->rt.nr_cpus_allowed > 1)
enqueue_pushable_task(rq, p);
-
- inc_cpu_load(rq, p->se.load.weight);
}
static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int
sleep)
@@ -942,8 +940,6 @@ static void dequeue_task_rt(struct rq *rq, struct
task_struct *p, int sleep)
dequeue_rt_entity(rt_se);
dequeue_pushable_task(rq, p);
-
- dec_cpu_load(rq, p->se.load.weight);
}
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC][PATCH -rt] sched: fully ignore RT tasks for CFS load-balancing
2009-08-26 14:44 [RFC][PATCH -rt] sched: fully ignore RT tasks for CFS load-balancing Peter Zijlstra
@ 2009-08-26 18:52 ` Darren Hart
2009-08-26 19:04 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Darren Hart @ 2009-08-26 18:52 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Thomas Gleixner, Ingo Molnar, linux-kernel
Peter Zijlstra wrote:
> Since -rt runs IRQs and SoftIRQs as RT tasks and load-balancing is done
> from softirq context, there is always at least one RT task (and very
> likely multiple) running when we balance.
>
> The current (and totally broken) interaction between RT tasks and CFS
> load-balancing makes it so that we'll try to evacuate a significant
> amount of tasks due to RT tasks being runnable.
>
> Solve this in another broken way by not accounting RT tasks at all.
>
> This will likely break another class of cases, but until we can properly
> fix this, we might as well do this.
Peter,
Do we know why this became a problem lately? I don't recall seeing load
balancing issues like this way back around 2.6.21 or 22 when CFS was
released. Is the cpu_load stuff fairly recent?
--
Darren
>
> Chucked-on-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
> kernel/sched_rt.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
> index adcbc68..385d31f 100644
> --- a/kernel/sched_rt.c
> +++ b/kernel/sched_rt.c
> @@ -926,8 +926,6 @@ static void enqueue_task_rt(struct rq *rq, struct
> task_struct *p, int wakeup)
>
> if (!task_current(rq, p) && p->rt.nr_cpus_allowed > 1)
> enqueue_pushable_task(rq, p);
> -
> - inc_cpu_load(rq, p->se.load.weight);
> }
>
> static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int
> sleep)
> @@ -942,8 +940,6 @@ static void dequeue_task_rt(struct rq *rq, struct
> task_struct *p, int sleep)
> dequeue_rt_entity(rt_se);
>
> dequeue_pushable_task(rq, p);
> -
> - dec_cpu_load(rq, p->se.load.weight);
> }
>
> /*
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC][PATCH -rt] sched: fully ignore RT tasks for CFS load-balancing
2009-08-26 18:52 ` Darren Hart
@ 2009-08-26 19:04 ` Peter Zijlstra
0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2009-08-26 19:04 UTC (permalink / raw)
To: Darren Hart; +Cc: Thomas Gleixner, Ingo Molnar, linux-kernel
On Wed, 2009-08-26 at 11:52 -0700, Darren Hart wrote:
> Peter Zijlstra wrote:
> > Since -rt runs IRQs and SoftIRQs as RT tasks and load-balancing is done
> > from softirq context, there is always at least one RT task (and very
> > likely multiple) running when we balance.
> >
> > The current (and totally broken) interaction between RT tasks and CFS
> > load-balancing makes it so that we'll try to evacuate a significant
> > amount of tasks due to RT tasks being runnable.
> >
> > Solve this in another broken way by not accounting RT tasks at all.
> >
> > This will likely break another class of cases, but until we can properly
> > fix this, we might as well do this.
>
> Peter,
>
> Do we know why this became a problem lately? I don't recall seeing load
> balancing issues like this way back around 2.6.21 or 22 when CFS was
> released. Is the cpu_load stuff fairly recent?
The earlier problem solved by the previous patch was caused by tglx
tinkering with the cpu_load computation.
This particular problem I'm not sure about, afaict it should have been
present a long long time.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-26 19:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 14:44 [RFC][PATCH -rt] sched: fully ignore RT tasks for CFS load-balancing Peter Zijlstra
2009-08-26 18:52 ` Darren Hart
2009-08-26 19:04 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox