From patchwork Fri Apr 29 19:32:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 66971 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp969264qge; Fri, 29 Apr 2016 12:33:45 -0700 (PDT) X-Received: by 10.66.172.165 with SMTP id bd5mr32086568pac.128.1461958418730; Fri, 29 Apr 2016 12:33:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si19563929paa.62.2016.04.29.12.33.38; Fri, 29 Apr 2016 12:33:38 -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 S1752884AbcD2Tda (ORCPT + 29 others); Fri, 29 Apr 2016 15:33:30 -0400 Received: from foss.arm.com ([217.140.101.70]:53142 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbcD2Td3 (ORCPT ); Fri, 29 Apr 2016 15:33:29 -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 D0876535; Fri, 29 Apr 2016 12:33:25 -0700 (PDT) Received: from e107985-lin.cambridge.arm.com (e107985-lin.cambridge.arm.com [10.1.207.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B6A1A3F25F; Fri, 29 Apr 2016 12:33:22 -0700 (PDT) From: Dietmar Eggemann To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Morten Rasmussen Subject: [PATCH 7/7] sched/fair: Use group_cfs_rq(se) instead of se->my_q Date: Fri, 29 Apr 2016 20:32:44 +0100 Message-Id: <1461958364-675-8-git-send-email-dietmar.eggemann@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461958364-675-1-git-send-email-dietmar.eggemann@arm.com> References: <1461958364-675-1-git-send-email-dietmar.eggemann@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace all occurrences of se->my_q right values with group_cfs_rq(se) so it is used consistently to access the cfs_rq owned by this se/tg. Signed-off-by: Dietmar Eggemann --- kernel/sched/fair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 1.9.1 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 58da724b6ca4..63ed09154a41 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4898,17 +4898,17 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg) for_each_sched_entity(se) { long w, W; - tg = se->my_q->tg; + tg = group_cfs_rq(se)->tg; /* * W = @wg + \Sum rw_j */ - W = wg + calc_tg_weight(tg, se->my_q); + W = wg + calc_tg_weight(tg, group_cfs_rq(se)); /* * w = rw_i + @wl */ - w = cfs_rq_load_avg(se->my_q) + wl; + w = cfs_rq_load_avg(group_cfs_rq(se)) + wl; /* * wl = S * s'_i; see (2) @@ -8528,7 +8528,7 @@ void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq, se->cfs_rq = &rq->cfs; se->depth = 0; } else { - se->cfs_rq = parent->my_q; + se->cfs_rq = group_cfs_rq(parent); se->depth = parent->depth + 1; }