mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: Yong Zhang <yong.zhang0@gmail.com>,
	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: correct how RT task is picked
Date: Wed, 18 May 2011 09:24:04 -0400	[thread overview]
Message-ID: <1305725044.26849.11.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <BANLkTikMdAG4HFmhiB9c3x97FH0N3PnpHA@mail.gmail.com>

On Wed, 2011-05-18 at 21:19 +0800, Hillf Danton wrote:

> Hi all
> 
> The patch is prepared again, in which tests for both cpu and
> nr_cpus_allowed are dropped.
> 
> The reason to drop nr_cpus_allowed is to make sure that the
> returned value is correct for both case that cpu == rq->cpu and
> case that cpu != rq->cpu.

-ENOPARSE

Why would we pick a task that can't migrate?

-- Steve

> 
> thanks
> 
> Hillf
> ---
> 
> --- a/kernel/sched_rt.c	2011-04-27 11:48:50.000000000 +0800
> +++ b/kernel/sched_rt.c	2011-05-18 21:16:22.000000000 +0800
> @@ -1149,9 +1149,7 @@ static void deactivate_task(struct rq *r
> 
>  static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
>  {
> -	if (!task_running(rq, p) &&
> -	    (cpu < 0 || cpumask_test_cpu(cpu, &p->cpus_allowed)) &&
> -	    (p->rt.nr_cpus_allowed > 1))
> +	if (!task_running(rq, p) && cpumask_test_cpu(cpu, &p->cpus_allowed))
>  		return 1;
>  	return 0;
>  }



  reply	other threads:[~2011-05-18 13:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 13:04 Hillf Danton
2011-05-11  8:43 ` Yong Zhang
2011-05-11 13:44   ` Hillf Danton
2011-05-12 12:06     ` Yong Zhang
2011-05-18  1:38       ` Steven Rostedt
2011-05-18  2:31         ` Yong Zhang
2011-05-18 13:19           ` Hillf Danton
2011-05-18 13:24             ` Steven Rostedt [this message]
2011-05-18 14:46               ` Hillf Danton
2011-05-18 15:15                 ` Steven Rostedt
2011-05-18 15:20                   ` Peter Zijlstra
2011-05-19 12:49                     ` [PATCH resend] " Hillf Danton
2011-05-19  1:41                 ` [PATCH] " Yong Zhang
2011-05-19  1:44                   ` Yong Zhang

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=1305725044.26849.11.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=dhillf@gmail.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=yong.zhang0@gmail.com \
    /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

all inboxes | Powered by JetHome®