[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YK474+4xpYlAha+2@hirez.programming.kicks-ass.net>
Date: Wed, 26 May 2021 14:15:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Barry Song <song.bao.hua@...ilicon.com>
Cc: vincent.guittot@...aro.org, mingo@...hat.com,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, valentin.schneider@....com, juri.lelli@...hat.com,
bristot@...hat.com, linux-kernel@...r.kernel.org,
guodong.xu@...aro.org, yangyicong@...wei.com,
tangchengchang@...wei.com, linuxarm@...wei.com
Subject: Re: [PATCH] sched: fair: don't depend on wake_wide if waker and
wakee are already in same LLC
$subject is weird; sched/fair: is the right tag, and then start with a
capital letter.
On Wed, May 26, 2021 at 09:10:57PM +1200, Barry Song wrote:
> when waker and wakee are already in the same LLC, it is pointless to worry
> about the competition caused by pulling wakee to waker's LLC domain.
But there's more than LLC.
> Signed-off-by: Barry Song <song.bao.hua@...ilicon.com>
> ---
> kernel/sched/fair.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 3248e24a90b0..cfb1bd47acc3 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6795,7 +6795,15 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
> new_cpu = prev_cpu;
> }
>
> - want_affine = !wake_wide(p) && cpumask_test_cpu(cpu, p->cpus_ptr);
> + /*
> + * we use wake_wide to make smarter pull and avoid cruel
> + * competition because of jam-packed tasks in waker's LLC
> + * domain. But if waker and wakee have been already in
> + * same LLC domain, it seems it is pointless to depend
> + * on wake_wide
> + */
> + want_affine = (cpus_share_cache(cpu, prev_cpu) || !wake_wide(p)) &&
> + cpumask_test_cpu(cpu, p->cpus_ptr);
> }
And no supportive numbers...
Powered by blists - more mailing lists