From: Steven Rostedt <rostedt@goodmis.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>,
Yong Zhang <yong.zhang0@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sched: select eligible run-queue for RT task
Date: Wed, 15 Jun 2011 13:50:40 -0400 [thread overview]
Message-ID: <1308160240.9218.129.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <BANLkTinmZ1tSpbwV7448usb1nshw=FJXXA@mail.gmail.com>
On Fri, 2011-06-03 at 22:06 +0800, Hillf Danton wrote:
> When selecting run-queue for a given task, eligible run-queue should be
> returned by checking the CPU affinity of task.
>
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> kernel/sched_rt.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
> index 88725c9..45b3e0a 100644
> --- a/kernel/sched_rt.c
> +++ b/kernel/sched_rt.c
> @@ -1006,7 +1006,8 @@ select_task_rq_rt(struct task_struct *p, int
> sd_flag, int flags)
> int cpu;
>
> if (sd_flag != SD_BALANCE_WAKE)
> - return smp_processor_id();
> + return cpumask_test_cpu(smp_processor_id(), &p->cpus_allowed) ?
> + smp_processor_id() : task_cpu(p);
I wonder if we should bother even dhoing a test here. Perhaps a better
solution is just:
if (sd_flag != SD_BALANCE_WAKE)
return task_cpu(p);
-- Steve
next prev parent reply other threads:[~2011-06-15 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 14:06 Hillf Danton
2011-06-15 17:50 ` Steven Rostedt [this message]
2011-06-16 3:19 ` Mike Galbraith
2011-06-16 3:51 ` Steven Rostedt
2011-06-16 4:24 ` Mike Galbraith
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=1308160240.9218.129.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®