summaryrefslogtreecommitdiffstats
path: root/kernel/sched/debug.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-05-08 10:51:41 -0400
committerIngo Molnar <mingo@kernel.org>2017-09-29 13:35:14 -0400
commit2a2f5d4e44ed160a5ed822c94e04f918f9fbb487 (patch)
tree044c01816758a1501c3565f6ebb53ef2c34c3ea9 /kernel/sched/debug.c
parent9059393e4ec1c8c6623a120b405ef2c90b968d80 (diff)
sched/fair: Rewrite cfs_rq->removed_*avg
Since on wakeup migration we don't hold the rq->lock for the old CPU we cannot update its state. Instead we add the removed 'load' to an atomic variable and have the next update on that CPU collect and process it. Currently we have 2 atomic variables; which already have the issue that they can be read out-of-sync. Also, two atomic ops on a single cacheline is already more expensive than an uncontended lock. Since we want to add more, convert the thing over to an explicit cacheline with a lock in. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r--kernel/sched/debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 2f93e4a2d9f6..2f22342c48ff 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -564,10 +564,10 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
564 cfs_rq->runnable_load_avg); 564 cfs_rq->runnable_load_avg);
565 SEQ_printf(m, " .%-30s: %lu\n", "util_avg", 565 SEQ_printf(m, " .%-30s: %lu\n", "util_avg",
566 cfs_rq->avg.util_avg); 566 cfs_rq->avg.util_avg);
567 SEQ_printf(m, " .%-30s: %ld\n", "removed_load_avg", 567 SEQ_printf(m, " .%-30s: %ld\n", "removed.load_avg",
568 atomic_long_read(&cfs_rq->removed_load_avg)); 568 cfs_rq->removed.load_avg);
569 SEQ_printf(m, " .%-30s: %ld\n", "removed_util_avg", 569 SEQ_printf(m, " .%-30s: %ld\n", "removed.util_avg",
570 atomic_long_read(&cfs_rq->removed_util_avg)); 570 cfs_rq->removed.util_avg);
571#ifdef CONFIG_FAIR_GROUP_SCHED 571#ifdef CONFIG_FAIR_GROUP_SCHED
572 SEQ_printf(m, " .%-30s: %lu\n", "tg_load_avg_contrib", 572 SEQ_printf(m, " .%-30s: %lu\n", "tg_load_avg_contrib",
573 cfs_rq->tg_load_avg_contrib); 573 cfs_rq->tg_load_avg_contrib);