linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@intel.com>
To: torvalds@linux-foundation.org, mingo@redhat.com,
	peterz@infradead.org, tglx@linutronix.de,
	akpm@linux-foundation.org, arjan@linux.intel.com, bp@alien8.de,
	pjt@google.com, namhyung@kernel.org, efault@gmx.de
Cc: vincent.guittot@linaro.org, gregkh@linuxfoundation.org,
	preeti@linux.vnet.ibm.com, viresh.kumar@linaro.org,
	linux-kernel@vger.kernel.org, alex.shi@intel.com
Subject: [patch v4 08/18] Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking"
Date: Thu, 24 Jan 2013 11:06:50 +0800	[thread overview]
Message-ID: <1358996820-23036-9-git-send-email-alex.shi@intel.com> (raw)
In-Reply-To: <1358996820-23036-1-git-send-email-alex.shi@intel.com>

Remove CONFIG_FAIR_GROUP_SCHED that covers the runnable info, then
we can use runnable load variables.

Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 include/linux/sched.h |  8 +-------
 kernel/sched/core.c   |  7 +------
 kernel/sched/fair.c   | 13 ++-----------
 kernel/sched/sched.h  |  9 +--------
 4 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index f283d3d..66b05e1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1195,13 +1195,7 @@ struct sched_entity {
 	/* rq "owned" by this entity/group: */
 	struct cfs_rq		*my_q;
 #endif
-/*
- * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be
- * removed when useful for applications beyond shares distribution (e.g.
- * load-balance).
- */
-#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
-	/* Per-entity load-tracking */
+#ifdef CONFIG_SMP
 	struct sched_avg	avg;
 #endif
 };
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7292965..0bd9d5f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1551,12 +1551,7 @@ static void __sched_fork(struct task_struct *p)
 	p->se.vruntime			= 0;
 	INIT_LIST_HEAD(&p->se.group_node);
 
-/*
- * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be
- * removed when useful for applications beyond shares distribution (e.g.
- * load-balance).
- */
-#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
+#ifdef CONFIG_SMP
 	p->se.avg.runnable_avg_period = 0;
 	p->se.avg.runnable_avg_sum = 0;
 	p->se.avg.decay_count = 0;
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5c545e4..efeb65c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1109,8 +1109,7 @@ static inline void update_cfs_shares(struct cfs_rq *cfs_rq)
 }
 #endif /* CONFIG_FAIR_GROUP_SCHED */
 
-/* Only depends on SMP, FAIR_GROUP_SCHED may be removed when useful in lb */
-#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
+#ifdef CONFIG_SMP
 /*
  * We choose a half-life close to 1 scheduling period.
  * Note: The tables below are dependent on this value.
@@ -3391,12 +3390,6 @@ unlock:
 }
 
 /*
- * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be
- * removed when useful for applications beyond shares distribution (e.g.
- * load-balance).
- */
-#ifdef CONFIG_FAIR_GROUP_SCHED
-/*
  * Called immediately before a task is migrated to a new cpu; task_cpu(p) and
  * cfs_rq_of(p) references at time of call are still valid and identify the
  * previous cpu.  However, the caller only guarantees p->pi_lock is held; no
@@ -3419,7 +3412,6 @@ migrate_task_rq_fair(struct task_struct *p, int next_cpu)
 		atomic64_add(se->avg.load_avg_contrib, &cfs_rq->removed_load);
 	}
 }
-#endif
 #endif /* CONFIG_SMP */
 
 static unsigned long
@@ -6111,9 +6103,8 @@ const struct sched_class fair_sched_class = {
 
 #ifdef CONFIG_SMP
 	.select_task_rq		= select_task_rq_fair,
-#ifdef CONFIG_FAIR_GROUP_SCHED
 	.migrate_task_rq	= migrate_task_rq_fair,
-#endif
+
 	.rq_online		= rq_online_fair,
 	.rq_offline		= rq_offline_fair,
 
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fc88644..ae3511e 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -225,12 +225,6 @@ struct cfs_rq {
 #endif
 
 #ifdef CONFIG_SMP
-/*
- * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be
- * removed when useful for applications beyond shares distribution (e.g.
- * load-balance).
- */
-#ifdef CONFIG_FAIR_GROUP_SCHED
 	/*
 	 * CFS Load tracking
 	 * Under CFS, load is tracked on a per-entity basis and aggregated up.
@@ -240,8 +234,7 @@ struct cfs_rq {
 	u64 runnable_load_avg, blocked_load_avg;
 	atomic64_t decay_counter, removed_load;
 	u64 last_decay;
-#endif /* CONFIG_FAIR_GROUP_SCHED */
-/* These always depend on CONFIG_FAIR_GROUP_SCHED */
+
 #ifdef CONFIG_FAIR_GROUP_SCHED
 	u32 tg_runnable_contrib;
 	u64 tg_load_contrib;
-- 
1.7.12


  parent reply	other threads:[~2013-01-24  3:08 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  3:06 [patch v4 0/18] sched: simplified fork, release load avg and power awareness scheduling Alex Shi
2013-01-24  3:06 ` [patch v4 01/18] sched: set SD_PREFER_SIBLING on MC domain to reduce a domain level Alex Shi
2013-02-12 10:11   ` Peter Zijlstra
2013-02-13 13:22     ` Alex Shi
2013-02-15 12:38       ` Peter Zijlstra
2013-02-16  5:16         ` Alex Shi
2013-02-13 14:17     ` Alex Shi
2013-01-24  3:06 ` [patch v4 02/18] sched: select_task_rq_fair clean up Alex Shi
2013-02-12 10:14   ` Peter Zijlstra
2013-02-13 14:44     ` Alex Shi
2013-01-24  3:06 ` [patch v4 03/18] sched: fix find_idlest_group mess logical Alex Shi
2013-02-12 10:16   ` Peter Zijlstra
2013-02-13 15:07     ` Alex Shi
2013-01-24  3:06 ` [patch v4 04/18] sched: don't need go to smaller sched domain Alex Shi
2013-01-24  3:06 ` [patch v4 05/18] sched: quicker balancing on fork/exec/wake Alex Shi
2013-02-12 10:22   ` Peter Zijlstra
2013-02-14  3:13     ` Alex Shi
2013-02-14  8:12     ` Preeti U Murthy
2013-02-14 14:08       ` Alex Shi
2013-02-15 13:00       ` Peter Zijlstra
2013-01-24  3:06 ` [patch v4 06/18] sched: give initial value for runnable avg of sched entities Alex Shi
2013-02-12 10:23   ` Peter Zijlstra
2013-01-24  3:06 ` [patch v4 07/18] sched: set initial load avg of new forked task Alex Shi
2013-02-12 10:26   ` Peter Zijlstra
2013-02-13 15:14     ` Alex Shi
2013-02-13 15:41       ` Paul Turner
2013-02-14 13:07         ` Alex Shi
2013-02-19 11:34           ` Paul Turner
2013-02-20  4:18             ` Preeti U Murthy
2013-02-20  5:13             ` Alex Shi
2013-01-24  3:06 ` Alex Shi [this message]
2013-02-12 10:27   ` [patch v4 08/18] Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking" Peter Zijlstra
2013-02-13 15:23     ` Alex Shi
2013-02-13 15:45       ` Paul Turner
2013-02-14  3:07         ` Preeti U Murthy
2013-01-24  3:06 ` [patch v4 09/18] sched: add sched_policies in kernel Alex Shi
2013-02-12 10:36   ` Peter Zijlstra
2013-02-13 15:41     ` Alex Shi
2013-01-24  3:06 ` [patch v4 10/18] sched: add sysfs interface for sched_policy selection Alex Shi
2013-01-24  3:06 ` [patch v4 11/18] sched: log the cpu utilization at rq Alex Shi
2013-02-12 10:39   ` Peter Zijlstra
2013-02-14  3:10     ` Alex Shi
2013-01-24  3:06 ` [patch v4 12/18] sched: add power aware scheduling in fork/exec/wake Alex Shi
2013-01-24  3:06 ` [patch v4 13/18] sched: packing small tasks in wake/exec balancing Alex Shi
2013-01-24  3:06 ` [patch v4 14/18] sched: add power/performance balance allowed flag Alex Shi
2013-01-24  3:06 ` [patch v4 15/18] sched: pull all tasks from source group Alex Shi
2013-01-24  3:06 ` [patch v4 16/18] sched: don't care if the local group has capacity Alex Shi
2013-01-24  3:06 ` [patch v4 17/18] sched: power aware load balance, Alex Shi
2013-01-24  3:07 ` [patch v4 18/18] sched: lazy power balance Alex Shi
2013-01-24  9:44 ` [patch v4 0/18] sched: simplified fork, release load avg and power awareness scheduling Borislav Petkov
2013-01-24 15:07   ` Alex Shi
2013-01-27  2:41     ` Alex Shi
2013-01-27  4:36       ` Mike Galbraith
2013-01-27 10:35         ` Borislav Petkov
2013-01-27 13:25           ` Alex Shi
2013-01-27 15:51             ` Mike Galbraith
2013-01-28  5:17               ` Mike Galbraith
2013-01-28  5:51                 ` Alex Shi
2013-01-28  6:15                   ` Mike Galbraith
2013-01-28  6:42                     ` Mike Galbraith
2013-01-28  7:20                       ` Mike Galbraith
2013-01-29  1:17                       ` Alex Shi
2013-01-28  9:55                 ` Borislav Petkov
2013-01-28 10:44                   ` Mike Galbraith
2013-01-28 11:29                     ` Borislav Petkov
2013-01-28 11:32                       ` Mike Galbraith
2013-01-28 11:40                         ` Mike Galbraith
2013-01-28 15:22                           ` Borislav Petkov
2013-01-28 15:55                             ` Mike Galbraith
2013-01-29  1:38                               ` Alex Shi
2013-01-29  1:32                         ` Alex Shi
2013-01-29  1:36                       ` Alex Shi
2013-01-28 15:47                 ` Mike Galbraith
2013-01-29  1:45                   ` Alex Shi
2013-01-29  4:03                     ` Mike Galbraith
2013-01-29  2:27                   ` Alex Shi
2013-01-27 10:40       ` Borislav Petkov
2013-01-27 14:03         ` Alex Shi
2013-01-28  5:19         ` Alex Shi
2013-01-28  6:49           ` Mike Galbraith
2013-01-28  7:17             ` Alex Shi
2013-01-28  7:33               ` Mike Galbraith
2013-01-29  6:02           ` Alex Shi
2013-01-28  1:28 ` Alex Shi
2013-02-04  1:35 ` Alex Shi
2013-02-04 11:09   ` Ingo Molnar
2013-02-05  2:26     ` Alex Shi
2013-02-06  5:08       ` Alex Shi

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=1358996820-23036-9-git-send-email-alex.shi@intel.com \
    --to=alex.shi@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=efault@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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).