From: Brendan Jackman <brendan.jackman@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, Joel Fernandes <joelaf@google.com>,
Andres Oportus <andresoportus@google.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Josef Bacik <josef@toxicpanda.com>,
Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH] sched/fair: Sync task util before slow-path wakeup
Date: Wed, 02 Aug 2017 14:27:45 +0100 [thread overview]
Message-ID: <8760e6rtf2.fsf@arm.com> (raw)
In-Reply-To: <20170802132405.z5gvut7ecaygbhvy@hirez.programming.kicks-ass.net>
On Wed, Aug 02 2017 at 13:24, Peter Zijlstra wrote:
> On Wed, Aug 02, 2017 at 02:10:02PM +0100, Brendan Jackman wrote:
>> We use task_util in find_idlest_group via capacity_spare_wake. This
>> task_util is updated in wake_cap. However wake_cap is not the only
>> reason for ending up in find_idlest_group - we could have been sent
>> there by wake_wide. So explicitly sync the task util with prev_cpu
>> when we are about to head to find_idlest_group.
>>
>> We could simply do this at the beginning of
>> select_task_rq_fair (i.e. irrespective of whether we're heading to
>> select_idle_sibling or find_idlest_group & co), but I didn't want to
>> slow down the select_idle_sibling path more than necessary.
>>
>> Don't do this during fork balancing, we won't need the task_util and
>> we'd just clobber the last_update_time, which is supposed to be 0.
>
> So I remember Morten explicitly not aging util of tasks on wakeup
> because the old util was higher and better representative of what the
> new util would be, or something along those lines.
>
> Morten?
>
>> Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
>> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
>> Cc: Vincent Guittot <vincent.guittot@linaro.org>
>> Cc: Josef Bacik <josef@toxicpanda.com>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Morten Rasmussen <morten.rasmussen@arm.com>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> ---
>> kernel/sched/fair.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index c95880e216f6..62869ff252b4 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -5913,6 +5913,14 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
>> new_cpu = cpu;
>> }
>>
>> + if (sd && !(sd_flag & SD_BALANCE_FORK))
>> + /*
>> + * We're going to need the task's util for capacity_spare_wake
>> + * in select_idlest_group. Sync it up to prev_cpu's
>> + * last_update_time.
>> + */
>> + sync_entity_load_avg(&p->se);
>> +
>
> That has missing {}
OK. Also just noticed it refers to "select_idlest_group", will change to
"find_idlest_group".
>
>
>> if (!sd) {
>> pick_cpu:
>
> And if this patch lives, can you please fix up that broken label indent?
Sure.
>> if (sd_flag & SD_BALANCE_WAKE) /* XXX always ? */
Cheers,
Brendan
next prev parent reply other threads:[~2017-08-02 13:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 13:10 [PATCH] sched/fair: Sync task util before slow-path wakeup Brendan Jackman
2017-08-02 13:24 ` Peter Zijlstra
2017-08-02 13:27 ` Brendan Jackman [this message]
2017-08-07 12:51 ` Morten Rasmussen
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=8760e6rtf2.fsf@arm.com \
--to=brendan.jackman@arm.com \
--cc=andresoportus@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joelaf@google.com \
--cc=josef@toxicpanda.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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.