* [PATCH] sched: fix how RT task is pulled
@ 2011-05-15 2:50 Hillf Danton
2011-05-17 2:35 ` Yong Zhang
0 siblings, 1 reply; 5+ messages in thread
From: Hillf Danton @ 2011-05-15 2:50 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Mike Galbraith, Yong Zhang
When pulling RT task for a given runqueue, if it is already overloaded
with RT tasks, the pull operation could be avoided at the moment.
btw, it looks like a typo?
Signed-off-by: Hillf Danton <dhillf@gmail.com>
---
kernel/sched_rt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 19ecb31..14c764b 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1440,7 +1440,7 @@ static int pull_rt_task(struct rq *this_rq)
struct task_struct *p;
struct rq *src_rq;
- if (likely(!rt_overloaded(this_rq)))
+ if (unlikely(rt_overloaded(this_rq)))
return 0;
for_each_cpu(cpu, this_rq->rd->rto_mask) {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: fix how RT task is pulled
2011-05-15 2:50 [PATCH] sched: fix how RT task is pulled Hillf Danton
@ 2011-05-17 2:35 ` Yong Zhang
2011-05-17 14:47 ` Hillf Danton
0 siblings, 1 reply; 5+ messages in thread
From: Yong Zhang @ 2011-05-17 2:35 UTC (permalink / raw)
To: Hillf Danton; +Cc: LKML, Ingo Molnar, Peter Zijlstra, Mike Galbraith
On Sun, May 15, 2011 at 10:50 AM, Hillf Danton <dhillf@gmail.com> wrote:
> When pulling RT task for a given runqueue, if it is already overloaded
> with RT tasks, the pull operation could be avoided at the moment.
>
> btw, it looks like a typo?
No.
Below is how rt_overloaded() is realized:
static inline int rt_overloaded(struct rq *rq)
{
return atomic_read(&rq->rd->rto_count);
}
You can notice it's about the overload of the very root_domain.
Thanks,
Yong
>
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> kernel/sched_rt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
> index 19ecb31..14c764b 100644
> --- a/kernel/sched_rt.c
> +++ b/kernel/sched_rt.c
> @@ -1440,7 +1440,7 @@ static int pull_rt_task(struct rq *this_rq)
> struct task_struct *p;
> struct rq *src_rq;
>
> - if (likely(!rt_overloaded(this_rq)))
> + if (unlikely(rt_overloaded(this_rq)))
> return 0;
>
> for_each_cpu(cpu, this_rq->rd->rto_mask) {
>
--
Only stand for myself
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: fix how RT task is pulled
2011-05-17 2:35 ` Yong Zhang
@ 2011-05-17 14:47 ` Hillf Danton
2011-05-17 18:27 ` Mike Galbraith
0 siblings, 1 reply; 5+ messages in thread
From: Hillf Danton @ 2011-05-17 14:47 UTC (permalink / raw)
To: Yong Zhang; +Cc: LKML, Ingo Molnar, Peter Zijlstra, Mike Galbraith
On Tue, May 17, 2011 at 10:35 AM, Yong Zhang <yong.zhang0@gmail.com> wrote:
> On Sun, May 15, 2011 at 10:50 AM, Hillf Danton <dhillf@gmail.com> wrote:
>> When pulling RT task for a given runqueue, if it is already overloaded
>> with RT tasks, the pull operation could be avoided at the moment.
>>
>> btw, it looks like a typo?
>
> No.
>
> Below is how rt_overloaded() is realized:
> static inline int rt_overloaded(struct rq *rq)
> {
> return atomic_read(&rq->rd->rto_count);
> }
>
> You can notice it's about the overload of the very root_domain.
>
Well, why is it going no head if not overloaded?
thanks
Hillf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: fix how RT task is pulled
2011-05-17 14:47 ` Hillf Danton
@ 2011-05-17 18:27 ` Mike Galbraith
2011-05-18 1:24 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2011-05-17 18:27 UTC (permalink / raw)
To: Hillf Danton; +Cc: Yong Zhang, LKML, Ingo Molnar, Peter Zijlstra
On Tue, 2011-05-17 at 22:47 +0800, Hillf Danton wrote:
> On Tue, May 17, 2011 at 10:35 AM, Yong Zhang <yong.zhang0@gmail.com> wrote:
> > On Sun, May 15, 2011 at 10:50 AM, Hillf Danton <dhillf@gmail.com> wrote:
> >> When pulling RT task for a given runqueue, if it is already overloaded
> >> with RT tasks, the pull operation could be avoided at the moment.
> >>
> >> btw, it looks like a typo?
> >
> > No.
> >
> > Below is how rt_overloaded() is realized:
> > static inline int rt_overloaded(struct rq *rq)
> > {
> > return atomic_read(&rq->rd->rto_count);
> > }
> >
> > You can notice it's about the overload of the very root_domain.
> >
> Well, why is it going no head if not overloaded?
To avoid examining masks (maybe huge) routinely. Challenge is to
improve oddball case (overload) without injuring the common case.
-Mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: fix how RT task is pulled
2011-05-17 18:27 ` Mike Galbraith
@ 2011-05-18 1:24 ` Steven Rostedt
0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2011-05-18 1:24 UTC (permalink / raw)
To: Mike Galbraith
Cc: Hillf Danton, Yong Zhang, LKML, Ingo Molnar, Peter Zijlstra
On Tue, May 17, 2011 at 08:27:09PM +0200, Mike Galbraith wrote:
> > >
> > Well, why is it going no head if not overloaded?
>
> To avoid examining masks (maybe huge) routinely. Challenge is to
> improve oddball case (overload) without injuring the common case.
Correct.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-18 1:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-15 2:50 [PATCH] sched: fix how RT task is pulled Hillf Danton
2011-05-17 2:35 ` Yong Zhang
2011-05-17 14:47 ` Hillf Danton
2011-05-17 18:27 ` Mike Galbraith
2011-05-18 1:24 ` Steven Rostedt
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).