Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932090AbbEZNbv (ORCPT ); Tue, 26 May 2015 09:31:51 -0400 Received: from relay.parallels.com ([195.214.232.42]:52792 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbbEZNbp (ORCPT ); Tue, 26 May 2015 09:31:45 -0400 Message-ID: <1432641001.6866.58.camel@odin.com> Subject: [PATCH 1/2] sched/fair: make update_curr_fair() update whole hierarhy From: Kirill Tkhai To: CC: Peter Zijlstra , Konstantin Khlebnikov , Mohammed Naser , "Ingo Molnar" , Kirill Tkhai Date: Tue, 26 May 2015 14:50:01 +0300 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.30.16.109] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1101 Lines: 41 This patch makes update_curr_fair() similar to update_curr_rt(), which updates runtime on whole hierarhy. We need that in next patch. Signed-off-by: Kirill Tkhai --- kernel/sched/fair.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d597aea..ece94af 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -729,7 +729,18 @@ static void update_curr(struct cfs_rq *cfs_rq) static void update_curr_fair(struct rq *rq) { - update_curr(cfs_rq_of(&rq->curr->se)); + struct task_struct *curr = rq->curr; + struct sched_entity *se; + struct cfs_rq *cfs_rq; + + if (curr->sched_class != &fair_sched_class) + return; + se = &curr->se; + for_each_sched_entity(se) { + cfs_rq = cfs_rq_of(se); + update_curr(cfs_rq); + } + } static inline void -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/