public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: "Li, Aubrey" <aubrey.li@linux.intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>,
	kernel test robot <rong.a.chen@intel.com>,
	0day robot <lkp@intel.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Qais Yousef <qais.yousef@arm.com>,
	Valentin Schneider <valentin.schneider@arm.com>,
	Jiang Biao <benbjiang@gmail.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, ying.huang@intel.com, feng.tang@intel.com,
	zhengjun.xing@intel.com, mingo@redhat.com, peterz@infradead.org,
	juri.lelli@redhat.com, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com,
	Aubrey Li <aubrey.li@intel.com>,
	yu.c.chen@intel.com
Subject: Re: [sched/fair] 8d86968ac3: netperf.Throughput_tps -29.5% regression
Date: Wed, 2 Dec 2020 14:48:18 +0000	[thread overview]
Message-ID: <20201202144818.GZ3306@suse.de> (raw)
In-Reply-To: <b45171de-cb74-bf35-91bf-967dbd5567d1@linux.intel.com>

On Wed, Dec 02, 2020 at 10:29:59PM +0800, Li, Aubrey wrote:
> > If the idle mask is not getting cleared then select_idle_cpu() is
> > probably returning immediately. select_idle_core() is almost certainly
> > failing so that just leaves select_idle_smt() to find a potentially idle
> > CPU. That's a limited search space so tasks may be getting stacked and
> > missing CPUs that are idling for short periods.
> 
> Vincent suggested we decouple idle cpumask from short idle(stop tick) and
> set it every time the CPU enters idle, I'll make this change in V6.
> 

As a heads-up, I'm trying to prepare a series that alters the time
complexity in general of select_idle_sibling(). It would tie into what
you are doing with the idle cpumask tracking but would use it as a hint
for CPUs to search first. It's still a WIP but I'm hoping to post
something tomorrow. It would not replace your patch, just alter it a bit
in terms of what happens just before select_idle_cpu().

> > 
> > On the flip side, I expect cases like hackbench to benefit because it
> > can saturate a machine to such a degree that select_idle_cpu() is a waste
> > of time.
> 
> Yes, I believe that's also why I saw uperf/netperf improvement at high
> load levels.
> 

Yeah, hackbench is a case where SIS_AVG_CPU shines even though it does
not help other cases. It throttles the search. In the series I'm working
on right now, I simply kill SIS_AVG_CPU but might incorporate something
like it into SIS_PROP as the last patch of the series as an RFC.

> > 
> > That said, I haven't followed the different versions closely. I know v5
> > got a lot of feedback so will take a closer look at v6. Fundamentally
> > though I expect that using the idle mask will be a mixed bag. At low
> > utilisation or over-saturation, it'll be a benefit. At the point where
> > the machine is almost fully busy, some workloads will benefit (lightly
> > communicating workloads that occasionally migrate) and others will not
> > (ping-pong workloads looking for CPUs that are idle for very brief
> > periods).
> 
> Do you have any interested workload [matrix] I can do the measurement?
> 

Usually I go with a battery of tests from mmtests instead of one or two
specifically to have a mix of wakeup timing, communication patterns and
degrees of utilisation. The downside is that they take ages to run.

> > It's tricky enough that it might benefit from a sched_feat() check that
> > is default true so it gets tested. For regressions that show up, it'll
> > be easy enough to ask for the feature to be disabled to see if it fixes
> > it. Over time, that might give an idea of exactly what sort of workloads
> > benefit and what suffers.
> 
> Okay, I'll add a sched_feat() for this feature.
> 

If the series I'm preparing works out ok and your patch can be integrated,
the sched_feat() may not be necessary because your patch would further
reduce time complexity without worrying about when the information
gets reset.

-- 
Mel Gorman
SUSE Labs

  reply	other threads:[~2020-12-02 14:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 20:04 [RFC PATCH v4] sched/fair: select idle cpu from idle cpumask for task wakeup Aubrey Li
2020-11-18 12:06 ` Valentin Schneider
2020-11-19  1:13   ` Li, Aubrey
2020-11-18 13:36 ` Vincent Guittot
2020-11-19  1:34   ` Li, Aubrey
2020-11-19  8:19     ` Vincent Guittot
2020-11-19 11:41       ` Li, Aubrey
2020-11-22 14:03 ` [sched/fair] 8d86968ac3: hackbench.throughput 51.7% improvement kernel test robot
2020-11-25  9:09 ` [sched/fair] 8d86968ac3: netperf.Throughput_tps -29.5% regression kernel test robot
2020-11-26  6:57   ` Li, Aubrey
2020-11-26 12:13     ` Mel Gorman
2020-12-02 14:29       ` Li, Aubrey
2020-12-02 14:48         ` Mel Gorman [this message]
2020-12-02 16:22         ` Vincent Guittot

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=20201202144818.GZ3306@suse.de \
    --to=mgorman@suse.de \
    --cc=aubrey.li@intel.com \
    --cc=aubrey.li@linux.intel.com \
    --cc=benbjiang@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=feng.tang@intel.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rong.a.chen@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=ying.huang@intel.com \
    --cc=yu.c.chen@intel.com \
    --cc=zhengjun.xing@intel.com \
    /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