From: Mel Gorman <mgorman@techsingularity.net>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Barry Song <song.bao.hua@hisilicon.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Peter Ziljstra <peterz@infradead.org>,
Aubrey Li <aubrey.li@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Valentin Schneider <valentin.schneider@arm.com>,
Linux-ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/4] sched/fair: Do not replace recent_used_cpu with the new target
Date: Tue, 8 Dec 2020 11:02:44 +0000 [thread overview]
Message-ID: <20201208110244.GH3371@techsingularity.net> (raw)
In-Reply-To: <842ef1db-49d1-7d05-997b-1562383cdd28@arm.com>
On Tue, Dec 08, 2020 at 10:57:29AM +0100, Dietmar Eggemann wrote:
> On 07/12/2020 10:15, Mel Gorman wrote:
> > After select_idle_sibling, p->recent_used_cpu is set to the
> > new target. However on the next wakeup, prev will be the same as
>
> I'm confused here. Isn't current->recent_used_cpu set to 'cpu =
> smp_processor_id()' after sis()? Looking at v5.10-rc6.
If you are referring to this;
if (want_affine)
current->recent_used_cpu = cpu;
then it gets removed by the path. That replaces recent_used_cpu with the
wakers CPU which still works but the hit rate is lower.
>
> [...]
>
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 23934dbac635..01b38fc17bca 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -6274,6 +6274,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
> >
> > /* Check a recently used CPU as a potential idle candidate: */
> > recent_used_cpu = p->recent_used_cpu;
> > + p->recent_used_cpu = prev;
> > if (recent_used_cpu != prev &&
> > recent_used_cpu != target &&
> > cpus_share_cache(recent_used_cpu, target) &&
>
> p->recent_used_cpu is already set to prev in this if condition.
>
That can be removed as redundant, I'll fix it.
--
Mel Gorman
SUSE Labs
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-12-08 11:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 9:15 [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling Mel Gorman
2020-12-07 9:15 ` [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU Mel Gorman
2020-12-07 15:05 ` Vincent Guittot
2020-12-08 10:07 ` Dietmar Eggemann
2020-12-08 10:59 ` Mel Gorman
2020-12-08 13:24 ` Vincent Guittot
2020-12-08 13:36 ` Mel Gorman
2020-12-08 13:43 ` Vincent Guittot
2020-12-08 13:53 ` Mel Gorman
2020-12-08 14:47 ` Vincent Guittot
2020-12-08 15:12 ` Mel Gorman
2020-12-08 15:19 ` Vincent Guittot
2020-12-07 9:15 ` [PATCH 2/4] sched/fair: Do not replace recent_used_cpu with the new target Mel Gorman
2020-12-08 9:57 ` Dietmar Eggemann
2020-12-08 11:02 ` Mel Gorman [this message]
2020-12-07 9:15 ` [PATCH 3/4] sched/fair: Return an idle cpu if one is found after a failed search for an idle core Mel Gorman
2020-12-07 15:06 ` Vincent Guittot
2020-12-07 9:15 ` [PATCH 4/4] sched/fair: Avoid revisiting CPUs multiple times during select_idle_sibling Mel Gorman
2020-12-07 15:04 ` [RFC PATCH 0/4] Reduce worst-case scanning of runqueues in select_idle_sibling Vincent Guittot
2020-12-07 15:42 ` Mel Gorman
2020-12-08 2:06 ` Li, Aubrey
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=20201208110244.GH3371@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=aubrey.li@linux.intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=song.bao.hua@hisilicon.com \
--cc=valentin.schneider@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).