All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Barry Song <song.bao.hua@hisilicon.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Peter Ziljstra <peterz@infradead.org>,
	"Li, Aubrey" <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 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched
Date: Fri, 4 Dec 2020 15:40:29 +0000	[thread overview]
Message-ID: <20201204154029.GC3371@techsingularity.net> (raw)
In-Reply-To: <CAKfTPtBXUK7NnhN1Rxeq-o5t-G+csN6Tj0yP=BSV_sdD1uZS0g@mail.gmail.com>

On Fri, Dec 04, 2020 at 04:23:48PM +0100, Vincent Guittot wrote:
> On Fri, 4 Dec 2020 at 15:31, Mel Gorman <mgorman@techsingularity.net> wrote:
> >
> > On Fri, Dec 04, 2020 at 02:47:48PM +0100, Vincent Guittot wrote:
> > > > IIUC, select_idle_core and select_idle_cpu share the same cpumask(select_idle_mask)?
> > > > If the target's sibling is removed from select_idle_mask from select_idle_core(),
> > > > select_idle_cpu() will lose the chance to pick it up?
> > >
> > > This is only relevant for patch 10 which is not to be included IIUC
> > > what mel said in cover letter : "Patches 9 and 10 are stupid in the
> > > context of this series."
> > >
> >
> > Patch 10 was stupid in the context of the prototype because
> > select_idle_core always returned a CPU. A variation ended up being
> > reintroduced at the end of the Series Yet To Be Posted so that SMT siblings
> > are cleared during select_idle_core() but select_idle_cpu() still has a
> > mask with unvisited CPUs to consider if no idle cores are found.
> >
> > As far as I know, this would still be compatible with Aubrey's idle
> > cpu mask as long as it's visited and cleared between select_idle_core
> > and select_idle_cpu. It relaxes the contraints on Aubrey to some extent
> > because the idle cpu mask would be a hint so if the information is out
> > of date, an idle cpu may still be found the normal way.
> 
> But even without patch 10, just replacing sched_domain_span(sd) by
> sds_idle_cpus(sd->shared) will ensure that sis loops only on cpus that
> get a chance to be idle so select_idle_core is likely to return an
> idle_candidate
> 

Yes but if the idle mask is out of date for any reason then idle CPUs might
be missed -- hence the intent to maintain a mask of CPUs visited and use
the idle cpu mask as a hint to prioritise CPUs that are likely idle but
fall back to a normal scan if none of the "idle cpu mask" CPUs are
actually idle.

-- 
Mel Gorman
SUSE Labs

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mgorman@techsingularity.net>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: "Li, Aubrey" <aubrey.li@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Barry Song <song.bao.hua@hisilicon.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Ziljstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Valentin Schneider <valentin.schneider@arm.com>,
	Linux-ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched
Date: Fri, 4 Dec 2020 15:40:29 +0000	[thread overview]
Message-ID: <20201204154029.GC3371@techsingularity.net> (raw)
In-Reply-To: <CAKfTPtBXUK7NnhN1Rxeq-o5t-G+csN6Tj0yP=BSV_sdD1uZS0g@mail.gmail.com>

On Fri, Dec 04, 2020 at 04:23:48PM +0100, Vincent Guittot wrote:
> On Fri, 4 Dec 2020 at 15:31, Mel Gorman <mgorman@techsingularity.net> wrote:
> >
> > On Fri, Dec 04, 2020 at 02:47:48PM +0100, Vincent Guittot wrote:
> > > > IIUC, select_idle_core and select_idle_cpu share the same cpumask(select_idle_mask)?
> > > > If the target's sibling is removed from select_idle_mask from select_idle_core(),
> > > > select_idle_cpu() will lose the chance to pick it up?
> > >
> > > This is only relevant for patch 10 which is not to be included IIUC
> > > what mel said in cover letter : "Patches 9 and 10 are stupid in the
> > > context of this series."
> > >
> >
> > Patch 10 was stupid in the context of the prototype because
> > select_idle_core always returned a CPU. A variation ended up being
> > reintroduced at the end of the Series Yet To Be Posted so that SMT siblings
> > are cleared during select_idle_core() but select_idle_cpu() still has a
> > mask with unvisited CPUs to consider if no idle cores are found.
> >
> > As far as I know, this would still be compatible with Aubrey's idle
> > cpu mask as long as it's visited and cleared between select_idle_core
> > and select_idle_cpu. It relaxes the contraints on Aubrey to some extent
> > because the idle cpu mask would be a hint so if the information is out
> > of date, an idle cpu may still be found the normal way.
> 
> But even without patch 10, just replacing sched_domain_span(sd) by
> sds_idle_cpus(sd->shared) will ensure that sis loops only on cpus that
> get a chance to be idle so select_idle_core is likely to return an
> idle_candidate
> 

Yes but if the idle mask is out of date for any reason then idle CPUs might
be missed -- hence the intent to maintain a mask of CPUs visited and use
the idle cpu mask as a hint to prioritise CPUs that are likely idle but
fall back to a normal scan if none of the "idle cpu mask" CPUs are
actually idle.

-- 
Mel Gorman
SUSE Labs

  reply	other threads:[~2020-12-04 15:41 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 14:11 [RFC PATCH 00/10] Reduce time complexity of select_idle_sibling Mel Gorman
2020-12-03 14:11 ` Mel Gorman
2020-12-03 14:11 ` [PATCH 01/10] sched/fair: Track efficiency " Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:11 ` [PATCH 02/10] sched/fair: Track efficiency of task recent_used_cpu Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:11 ` [PATCH 03/10] sched/fair: Remove SIS_AVG_CPU Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:11 ` [PATCH 04/10] sched/fair: Return an idle cpu if one is found after a failed search for an idle core Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 16:35   ` Vincent Guittot
2020-12-03 16:35     ` Vincent Guittot
2020-12-03 17:50     ` Mel Gorman
2020-12-03 17:50       ` Mel Gorman
2020-12-03 14:11 ` [PATCH 05/10] sched/fair: Do not replace recent_used_cpu with the new target Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:11 ` [PATCH 06/10] sched/fair: Clear the target CPU from the cpumask of CPUs searched Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 16:38   ` Vincent Guittot
2020-12-03 16:38     ` Vincent Guittot
2020-12-03 17:52     ` Mel Gorman
2020-12-03 17:52       ` Mel Gorman
2020-12-04 10:56       ` Vincent Guittot
2020-12-04 10:56         ` Vincent Guittot
2020-12-04 11:30         ` Mel Gorman
2020-12-04 11:30           ` Mel Gorman
2020-12-04 13:13           ` Vincent Guittot
2020-12-04 13:13             ` Vincent Guittot
2020-12-04 13:17             ` Vincent Guittot
2020-12-04 13:17               ` Vincent Guittot
2020-12-04 13:40               ` Li, Aubrey
2020-12-04 13:40                 ` Li, Aubrey
2020-12-04 13:47                 ` Li, Aubrey
2020-12-04 13:47                   ` Li, Aubrey
2020-12-04 13:47                 ` Vincent Guittot
2020-12-04 13:47                   ` Vincent Guittot
2020-12-04 14:07                   ` Li, Aubrey
2020-12-04 14:07                     ` Li, Aubrey
2020-12-04 14:31                   ` Mel Gorman
2020-12-04 14:31                     ` Mel Gorman
2020-12-04 15:23                     ` Vincent Guittot
2020-12-04 15:23                       ` Vincent Guittot
2020-12-04 15:40                       ` Mel Gorman [this message]
2020-12-04 15:40                         ` Mel Gorman
2020-12-04 15:43                         ` Vincent Guittot
2020-12-04 15:43                           ` Vincent Guittot
2020-12-04 18:41                           ` Mel Gorman
2020-12-04 18:41                             ` Mel Gorman
2020-12-04 14:27               ` Mel Gorman
2020-12-04 14:27                 ` Mel Gorman
2020-12-03 14:11 ` [PATCH 07/10] sched/fair: Account for the idle cpu/smt search cost Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:11 ` [PATCH 08/10] sched/fair: Reintroduce SIS_AVG_CPU but in the context of SIS_PROP to reduce search depth Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:11 ` [PATCH 09/10] sched/fair: Limit the search for an idle core Mel Gorman
2020-12-03 14:11   ` Mel Gorman
2020-12-03 14:19 ` Mel Gorman
2020-12-03 14:19   ` Mel Gorman
2020-12-03 14:20 ` [PATCH 10/10] sched/fair: Avoid revisiting CPUs multiple times during select_idle_sibling Mel Gorman
2020-12-03 14:20   ` Mel Gorman

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=20201204154029.GC3371@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=aubrey.li@linux.intel.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 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.