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: correct how RT task is picked
Date: Thu, 12 May 2011 20:06:06 +0800 [thread overview]
Message-ID: <20110512120606.GA3639@zhy> (raw)
In-Reply-To: <BANLkTikOecxhb8pZfAd19FLrPAPY4zacDQ@mail.gmail.com>
On Wed, May 11, 2011 at 09:44:04PM +0800, Hillf Danton wrote:
> On Wed, May 11, 2011 at 4:43 PM, Yong Zhang <yong.zhang0@gmail.com> wrote:
> > On Tue, May 10, 2011 at 9:04 PM, Hillf Danton <dhillf@gmail.com> wrote:
> >> When picking RT task for given CPU,
> >> [1] if the cpu is invalid for cpumask test, right result could not be
> >
> > 'cpu is invalid' means weather we care it or not, it's not real 'invalid'
> >
> If cpu is not cared, how to determine whether it is allowed for task to run?
pick_next_highest_task_rt() can be used to get the next highest pullable
task on a certain rq(regradless on which cpu that task could run). but
currently we have no such kind of caller.
>
> >> reached even by further checking nr_cpus_allowed,
> >> on the other hand, the input cpu is valid in two cases that
> >> pick_next_highest_task_rt() is called, thus the invalid input cpu
> >> looks over-concern.
> >> [2] if the cpu is valid for cpumask test, further checking
> >> nr_cpus_allowed looks overwork, since it is computed based on
> >> cpus_allowed,
> >
> > No, cpumask_test_cpu(cpu, &p->cpus_allowed) doesn't mean
> > p->rt.nr_cpus_allowed > 1.
> >
> If cpu is allowed for task to run, then why more cpus are enforced?
I think you can take a look at next_prio(), it just calculate the
next highest task on the current cpu; in this case,
cpumask_test_cpu(cpu, &p->cpus_allowed) will be true for the most
of time, but maybe that task is bound to this cpu.
Thanks,
Yong
>
> thanks
> Hillf
next prev parent reply other threads:[~2011-05-12 12:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 13:04 [PATCH] sched: correct how RT task is picked Hillf Danton
2011-05-11 8:43 ` Yong Zhang
2011-05-11 13:44 ` Hillf Danton
2011-05-12 12:06 ` Yong Zhang [this message]
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
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=20110512120606.GA3639@zhy \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.