linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Peter Zijlstra <peterz@infradead.org>,
	paul.szabo@sydney.edu.au, linux-kernel@vger.kernel.org
Subject: Re: [patch] sched: disable task group re-weighting on the desktop
Date: Sat, 10 Oct 2015 16:41:26 +0200	[thread overview]
Message-ID: <1444488086.2804.13.camel@gmail.com> (raw)
In-Reply-To: <201510102230.EuRy5bIi%fengguang.wu@intel.com>

On Sat, 2015-10-10 at 22:03 +0800, kbuild test robot wrote:
> Hi Mike,

Hi there pin-the-tail-on-the-donkey bot.  Eeee Ahhh :)

sched: disable task group wide utilization based weight on the desktop

Task group wide utilization based weight may work well for servers, but it
is horrible on the desktop.  8 groups of 1 hog demoloshes interactivity, 1
group of 8 hogs has noticable impact, 2 such groups is very very noticable.

Turn it off if autogroup is enabled, and add a feature to let people set the
definition of fair to what serves them best.  For the desktop, fixed group
weight wins hands down, no contest....

Signed-off-by: Mike Galbraith <umgwanakikbuit@gmail.com>
---
 kernel/sched/fair.c     |    5 +++++
 kernel/sched/features.h |   14 ++++++++++++++

---
 kernel/sched/fair.c     |    5 +++++
 kernel/sched/features.h |   14 ++++++++++++++
 2 files changed, 19 insertions(+)

--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2372,6 +2372,8 @@ static long calc_cfs_shares(struct cfs_r
 {
 	long tg_weight, load, shares;
 
+	if (!sched_feat(SMP_FAIR_GROUPS))
+		return tg->shares;
 	tg_weight = calc_tg_weight(tg, cfs_rq);
 	load = cfs_rq_load_avg(cfs_rq);
 
@@ -2423,6 +2425,9 @@ static void update_cfs_shares(struct cfs
 #ifndef CONFIG_SMP
 	if (likely(se->load.weight == tg->shares))
 		return;
+#else
+	if (!sched_feat(SMP_FAIR_GROUPS) && se->load.weight == tg->shares)
+		return;
 #endif
 	shares = calc_cfs_shares(cfs_rq, tg);
 
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -88,3 +88,17 @@ SCHED_FEAT(LB_MIN, false)
  */
 SCHED_FEAT(NUMA,	true)
 #endif
+
+#ifdef CONFIG_FAIR_GROUP_SCHED
+/*
+ * With SMP_FAIR_GROUPS set, activity group wide determines share for
+ * all froup members.  This does very bad things to interactivity when
+ * a desktop box is heavily loaded.  Default to off when autogroup is
+ * enabled, and let all users set it to what works best for them.
+ */
+#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
+SCHED_FEAT(SMP_FAIR_GROUPS, true)
+#else
+SCHED_FEAT(SMP_FAIR_GROUPS, false)
+#endif
+#endif






  reply	other threads:[~2015-10-10 14:41 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 21:48 CFS scheduler unfairly prefers pinned tasks paul.szabo
2015-10-06  2:45 ` Mike Galbraith
2015-10-06 10:06   ` paul.szabo
2015-10-06 12:17     ` Mike Galbraith
2015-10-06 20:44       ` paul.szabo
2015-10-07  1:28         ` Mike Galbraith
2015-10-08  8:19   ` Mike Galbraith
2015-10-08 10:54     ` paul.szabo
2015-10-08 11:19       ` Peter Zijlstra
2015-10-10 13:22         ` [patch] sched: disable task group re-weighting on the desktop Mike Galbraith
2015-10-10 14:03           ` kbuild test robot
2015-10-10 14:41             ` Mike Galbraith [this message]
2015-10-10 17:01           ` Peter Zijlstra
2015-10-10 17:13             ` Peter Zijlstra
2015-10-11  2:25             ` Mike Galbraith
2015-10-11 17:42               ` 4.3 group scheduling regression Mike Galbraith
2015-10-12  7:23                 ` Peter Zijlstra
2015-10-12  7:44                   ` Mike Galbraith
2015-10-12  8:04                     ` Peter Zijlstra
2015-10-12  0:53                       ` Yuyang Du
2015-10-12  9:12                         ` Peter Zijlstra
2015-10-12  2:12                           ` Yuyang Du
2015-10-12 10:23                             ` Mike Galbraith
2015-10-12 19:55                               ` Yuyang Du
2015-10-13  4:08                                 ` Mike Galbraith
2015-10-12 20:42                                   ` Yuyang Du
2015-10-13  8:06                                 ` Peter Zijlstra
2015-10-13  0:35                                   ` Yuyang Du
2015-10-13  8:10                                   ` Peter Zijlstra
2015-10-13  0:37                                     ` Yuyang Du
2015-10-12 11:47                             ` Peter Zijlstra
2015-10-12 19:32                               ` Yuyang Du
2015-10-13  8:07                                 ` Peter Zijlstra
2015-10-13  2:22                               ` Mike Galbraith
2015-10-12  8:48                       ` Mike Galbraith
2015-10-10 20:14           ` [patch] sched: disable task group re-weighting on the desktop paul.szabo
2015-10-11  2:38             ` Mike Galbraith
2015-10-11  9:25               ` paul.szabo
2015-10-11 12:49                 ` Mike Galbraith
2015-10-11 19:46           ` paul.szabo
2015-10-12  1:59             ` Mike Galbraith
2015-10-08 14:25       ` CFS scheduler unfairly prefers pinned tasks Mike Galbraith
2015-10-08 21:55         ` paul.szabo
2015-10-09  1:56           ` Mike Galbraith
2015-10-09  2:40           ` Mike Galbraith
2015-10-11  9:43             ` paul.szabo
2015-10-10  3:59     ` Wanpeng Li
2015-10-10  7:58       ` Wanpeng Li

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=1444488086.2804.13.camel@gmail.com \
    --to=umgwanakikbuti@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=paul.szabo@sydney.edu.au \
    --cc=peterz@infradead.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).