From patchwork Tue Mar 28 06:35:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 96105 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1566374qgd; Mon, 27 Mar 2017 23:36:07 -0700 (PDT) X-Received: by 10.99.247.69 with SMTP id f5mr29101465pgk.63.1490682967113; Mon, 27 Mar 2017 23:36:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h90si3199659plb.118.2017.03.27.23.36.06; Mon, 27 Mar 2017 23:36:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbdC1GgH (ORCPT + 19 others); 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 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1C551597; Mon, 27 Mar 2017 23:35:59 -0700 (PDT) Received: from e107985-lin.cambridge.arm.com (e107985-lin.cambridge.arm.com [10.1.210.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 364D33F59A; Mon, 27 Mar 2017 23:35:58 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.11.0 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) { }