From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755207AbbHCRLn (ORCPT ); Mon, 3 Aug 2015 13:11:43 -0400 Received: from terminus.zytor.com ([198.137.202.10]:40578 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754294AbbHCRLf (ORCPT ); Mon, 3 Aug 2015 13:11:35 -0400 Date: Mon, 3 Aug 2015 10:11:02 -0700 From: tip-bot for Vincent Guittot Message-ID: Cc: yuyang.du@intel.com, peterz@infradead.org, efault@gmx.de, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org Reply-To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, vincent.guittot@linaro.org, mingo@kernel.org, efault@gmx.de, hpa@zytor.com, peterz@infradead.org, yuyang.du@intel.com In-Reply-To: <1436918682-4971-4-git-send-email-yuyang.du@intel.com> References: <1436918682-4971-4-git-send-email-yuyang.du@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/fair: Implement update_blocked_averages() for CONFIG_FAIR_GROUP_SCHED=n Git-Commit-ID: 6c1d47c0827304949e0eb9479f4d587f226fac8b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 6c1d47c0827304949e0eb9479f4d587f226fac8b Gitweb: http://git.kernel.org/tip/6c1d47c0827304949e0eb9479f4d587f226fac8b Author: Vincent Guittot AuthorDate: Wed, 15 Jul 2015 08:04:38 +0800 Committer: Ingo Molnar CommitDate: Mon, 3 Aug 2015 12:24:28 +0200 sched/fair: Implement update_blocked_averages() for CONFIG_FAIR_GROUP_SCHED=n The load and the utilization of idle CPUs must be updated periodically in order to decay the blocked part. If CONFIG_FAIR_GROUP_SCHED is not set, the load and util of idle cpus are not decayed and stay at the values set before becoming idle. Signed-off-by: Vincent Guittot Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arjan@linux.intel.com Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: fengguang.wu@intel.com Cc: len.brown@intel.com Cc: morten.rasmussen@arm.com Cc: pjt@google.com Cc: rafael.j.wysocki@intel.com Cc: umgwanakikbuti@gmail.com Link: http://lkml.kernel.org/r/1436918682-4971-4-git-send-email-yuyang.du@intel.com [ Fixed up the SOB chain. ] Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 01ffa95..e4b80c6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5846,6 +5846,14 @@ static unsigned long task_h_load(struct task_struct *p) #else static inline void update_blocked_averages(int cpu) { + struct rq *rq = cpu_rq(cpu); + struct cfs_rq *cfs_rq = &rq->cfs; + unsigned long flags; + + raw_spin_lock_irqsave(&rq->lock, flags); + update_rq_clock(rq); + update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq); + raw_spin_unlock_irqrestore(&rq->lock, flags); } static unsigned long task_h_load(struct task_struct *p)