From: "Christ, Austin" <austinwc@codeaurora.org>
To: Peter Zijlstra <peterz@infradead.org>,
Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Tyler Baicar <tbaicar@codeaurora.org>,
Timur Tabi <timur@codeaurora.org>
Subject: Re: [PATCH V3 0/2] load_balance() fixes for affinity
Date: Mon, 22 May 2017 14:17:17 -0600 [thread overview]
Message-ID: <8716629f-6ccb-bfa1-62d5-3fee6b9f9316@codeaurora.org> (raw)
In-Reply-To: <20170522155217.zq3t6gkfu246ydxi@hirez.programming.kicks-ass.net>
Hey Peter,
On 5/22/2017 9:52 AM, Peter Zijlstra wrote:
> On Thu, May 18, 2017 at 01:36:01PM -0600, Jeffrey Hugo wrote:
>
>> The group_imbalance path correctly sets the flag
>> to indicate the group can not be properly balanced due to affinity, but the
>> redo condition right after this branch incorrectly assumes that there may
>> be other cores with work to be pulled by considering cores outside of the
>> scheduling domain in question.
> So its been a while since I looked at any of this, but from a quick
> look, env->cpus appears to only be applied to group/balance masks.
>
> In which case, we can easily do something like the below. Did I miss
> something?
We have looked through and agree with your proposed change; however, we
would still need to mask out the dst_cpu when considering the redo path.
We will include this modification in the next patch set.
>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 219fe58e3023..1724e4433f89 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8104,7 +8104,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
> if (idle == CPU_NEWLY_IDLE)
> env.dst_grpmask = NULL;
>
> - cpumask_copy(cpus, cpu_active_mask);
> + cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
>
> schedstat_inc(sd->lb_count[idle]);
>
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
prev parent reply other threads:[~2017-05-22 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 19:36 Jeffrey Hugo
2017-05-18 19:36 ` [PATCH V3 1/2] sched/fair: Fix load_balance() affinity redo path Jeffrey Hugo
2017-05-19 13:31 ` Dietmar Eggemann
2017-05-22 9:48 ` Dietmar Eggemann
2017-05-22 19:57 ` Christ, Austin
2017-05-23 11:45 ` Dietmar Eggemann
2017-05-23 22:05 ` Jeffrey Hugo
2017-05-18 19:36 ` [PATCH V3 2/2] sched/fair: Remove group imbalance from calculate_imbalance() Jeffrey Hugo
2017-05-22 15:52 ` [PATCH V3 0/2] load_balance() fixes for affinity Peter Zijlstra
2017-05-22 20:17 ` Christ, Austin [this message]
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=8716629f-6ccb-bfa1-62d5-3fee6b9f9316@codeaurora.org \
--to=austinwc@codeaurora.org \
--cc=dietmar.eggemann@arm.com \
--cc=jhugo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tbaicar@codeaurora.org \
--cc=timur@codeaurora.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
Powered by JetHome