From: Byungchul Park <byungchul.park@lge.com>
To: "Joel Fernandes (Google)" <joel.opensrc@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
mingo@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com,
Joel Fernandes <joelaf@google.com>
Subject: Re: [PATCH v7 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()
Date: Fri, 18 Aug 2017 16:55:33 +0900 [thread overview]
Message-ID: <20170818075533.GC20323@X58A-UD3R> (raw)
In-Reply-To: <CAEi0qNkH1W9+d3tYwZsY-cboaws9zu1E_EvmJNGA=ScRwprm0Q@mail.gmail.com>
On Fri, Aug 18, 2017 at 12:21:46AM -0700, Joel Fernandes (Google) wrote:
> Hi Byungchul,
>
> On Thu, Aug 17, 2017 at 11:05 PM, Byungchul Park <byungchul.park@lge.com> wrote:
> > It would be better to avoid pushing tasks to other cpu within
> > a SD_PREFER_SIBLING domain, instead, get more chances to check other
> > siblings.
> >
> > Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> > ---
> > kernel/sched/deadline.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++---
> > 1 file changed, 52 insertions(+), 3 deletions(-)
> >
> > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > index 0223694..8f69a37 100644
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -1319,12 +1319,35 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
> >
> > static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask_dl);
> >
> > +/*
> > + * Find the first cpu in: mask & sd & ~prefer
> > + */
> > +static int find_cpu(const struct cpumask *mask,
> > + const struct sched_domain *sd,
> > + const struct sched_domain *prefer)
> > +{
> > + const struct cpumask *sds = sched_domain_span(sd);
> > + const struct cpumask *ps = prefer ? sched_domain_span(prefer) : NULL;
> > + int cpu = -1;
> > +
> > + while ((cpu = cpumask_next(cpu, mask)) < nr_cpu_ids) {
>
> This can be simplified to for_each_cpu(cpu, mask) ?
Indeed, exactly.
I will use that, thank you.
next prev parent reply other threads:[~2017-08-18 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 6:05 [PATCH v7 0/2] Make find_later_rq() choose a closer cpu in topology Byungchul Park
2017-08-18 6:05 ` [PATCH v7 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() Byungchul Park
2017-08-18 7:21 ` Joel Fernandes (Google)
2017-08-18 7:55 ` Byungchul Park [this message]
2017-08-18 6:05 ` [PATCH v7 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq() Byungchul Park
2017-08-18 13:31 ` Steven Rostedt
2017-08-18 6:38 ` [PATCH v7 0/2] Make find_later_rq() choose a closer cpu in topology Byungchul Park
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=20170818075533.GC20323@X58A-UD3R \
--to=byungchul.park@lge.com \
--cc=joel.opensrc@gmail.com \
--cc=joelaf@google.com \
--cc=juri.lelli@gmail.com \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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