linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH] sched: fix how RT task is pulled
Date: Tue, 17 May 2011 10:35:37 +0800	[thread overview]
Message-ID: <BANLkTikPhwajRBZ-dx46NnobOu10AmXoSg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinw9LLiGD788+6AvbE+54jyVRUwBg@mail.gmail.com>

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

  reply	other threads:[~2011-05-17  2:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-15  2:50 [PATCH] sched: fix how RT task is pulled Hillf Danton
2011-05-17  2:35 ` Yong Zhang [this message]
2011-05-17 14:47   ` Hillf Danton
2011-05-17 18:27     ` Mike Galbraith
2011-05-18  1:24       ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikPhwajRBZ-dx46NnobOu10AmXoSg@mail.gmail.com \
    --to=yong.zhang0@gmail.com \
    --cc=dhillf@gmail.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).