Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754555AbdC1GgH (ORCPT ); Tue, 28 Mar 2017 02:36:07 -0400 Received: from foss.arm.com ([217.140.101.70]:43154 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754423AbdC1GgF (ORCPT ); Tue, 28 Mar 2017 02:36:05 -0400 From: Dietmar Eggemann To: Peter Zijlstra , Ingo Molnar Cc: LKML , Matt Fleming , Vincent Guittot , Steven Rostedt , Morten Rasmussen , Juri Lelli , Patrick Bellasi Subject: [RFC PATCH 3/5] sched/fair: Export group_cfs_rq() Date: Tue, 28 Mar 2017 07:35:39 +0100 Message-Id: <20170328063541.12912-4-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328063541.12912-1-dietmar.eggemann@arm.com> References: <20170328063541.12912-1-dietmar.eggemann@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1799 Lines: 66 Export struct cfs_rq *group_cfs_rq(struct sched_entity *se) to be able to distinguish sched_entities representing either tasks or task_groups in the sched_entity related load tracking trace event provided by the next patch. Signed-off-by: Dietmar Eggemann Cc: Peter Zijlstra Cc: Ingo Molnar --- include/linux/sched.h | 10 ++++++++++ kernel/sched/fair.c | 12 ------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index d67eee84fd43..8a35ff99140b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -392,6 +392,16 @@ struct sched_entity { #endif }; +/* cfs_rq "owned" by this sched_entity */ +static inline struct cfs_rq *group_cfs_rq(struct sched_entity *se) +{ +#ifdef CONFIG_FAIR_GROUP_SCHED + return se->my_q; +#else + return NULL; +#endif +} + struct sched_rt_entity { struct list_head run_list; unsigned long timeout; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ac19ab6ced8f..04d4f81b96ae 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -292,12 +292,6 @@ static inline struct cfs_rq *cfs_rq_of(struct sched_entity *se) return se->cfs_rq; } -/* runqueue "owned" by this group */ -static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp) -{ - return grp->my_q; -} - static inline void list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq) { if (!cfs_rq->on_list) { @@ -449,12 +443,6 @@ static inline struct cfs_rq *cfs_rq_of(struct sched_entity *se) return &rq->cfs; } -/* runqueue "owned" by this group */ -static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp) -{ - return NULL; -} - static inline void list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq) { } -- 2.11.0