Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1735931 > unrolled thread

Re: [PATCH v2] sched/fair: Sync task util before slow-path wakeup

Started byBrendan Jackman <brendan.jackman@arm.com>
First post2017-09-20 19:20 +0200
Last post2017-09-20 19:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] sched/fair: Sync task util before slow-path wakeup Brendan Jackman <brendan.jackman@arm.com> - 2017-09-20 19:20 +0200

#1735931 — Re: [PATCH v2] sched/fair: Sync task util before slow-path wakeup

FromBrendan Jackman <brendan.jackman@arm.com>
Date2017-09-20 19:20 +0200
SubjectRe: [PATCH v2] sched/fair: Sync task util before slow-path wakeup
Message-ID<urQPg-602-3@gated-at.bofh.it>
Hi Peter,

Ping.

Log of previous discussion: https://patchwork.kernel.org/patch/9876769/

Cheers,
Brendan

On Tue, Aug 08 2017 at 09:55, 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.
>
> 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>
> ---
>
> changes v1 -> v2: Just cosmetic
>
>  kernel/sched/fair.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index c95880e216f6..20275178604d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5913,8 +5913,17 @@ 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 find_idlest_group. Sync it up to prev_cpu's
> +		 * last_update_time.
> +		 */
> +		sync_entity_load_avg(&p->se);
> +	}
> +
>  	if (!sd) {
> - pick_cpu:
> +pick_cpu:
>  		if (sd_flag & SD_BALANCE_WAKE) /* XXX always ? */
>  			new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web