From patchwork Fri Jan 17 09:04:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 23303 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EA36F20540 for ; Fri, 17 Jan 2014 09:04:32 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id gq1sf6690881obb.0 for ; Fri, 17 Jan 2014 01:04:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=zehsrT9nbB71rkHDHOdWZJjElC1ZkeOJZmoOq2AJLCc=; b=QoG5jyNfClOc23utmGl1vV1mRuU0CZ/BxrzSwrDvSJfvjAjPw+1I67S9yE9IONtq36 /zNJHSuhwlh/FrAGGjuKNQ0MZoBnC8Q6jbZI3+S9hzFmXpozhrCvtOlg1rl57FdZOl9M ITiUlWsNDYlFVKWwwnl8tPseymLCOjVm4QFW2kPwsyA+9mseqFr7kiiakqp7oDx9ONbw yr9rZ0maUGhu4HSOfdqMoB8h7pHLlFE5E47VeM0R9eNoUiCIOcdxvUcoQyVHh3ljXk+s 57/KU/451NBVARcCL+9FzGzkt1qlWJjYRHtos0NDXOythjheBCAifKlQ0r/VfJgqD/09 cIUQ== X-Gm-Message-State: ALoCoQlE9vDNWP7oEUnhiH39V9ikoPeUVjB9P5f38tLqiE0lu366+72Hbhr18vf96iHq3AZQcaCJ X-Received: by 10.182.16.199 with SMTP id i7mr278860obd.42.1389949472009; Fri, 17 Jan 2014 01:04:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.228 with SMTP id h91ls419631qgh.14.gmail; Fri, 17 Jan 2014 01:04:31 -0800 (PST) X-Received: by 10.52.172.133 with SMTP id bc5mr278406vdc.11.1389949471847; Fri, 17 Jan 2014 01:04:31 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id px6si4617270vcb.19.2014.01.17.01.04.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:04:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id cz12so1442193veb.40 for ; Fri, 17 Jan 2014 01:04:31 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr331560vec.17.1389949471768; Fri, 17 Jan 2014 01:04:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp4844ved; Fri, 17 Jan 2014 01:04:31 -0800 (PST) X-Received: by 10.66.139.100 with SMTP id qx4mr725790pab.141.1389949468573; Fri, 17 Jan 2014 01:04:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si4860731pbe.169.2014.01.17.01.04.27; Fri, 17 Jan 2014 01:04:27 -0800 (PST) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbaAQJEU (ORCPT + 26 others); Fri, 17 Jan 2014 04:04:20 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:44225 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751331AbaAQJEI (ORCPT ); Fri, 17 Jan 2014 04:04:08 -0500 Received: by mail-wg0-f43.google.com with SMTP id y10so4154887wgg.34 for ; Fri, 17 Jan 2014 01:04:06 -0800 (PST) X-Received: by 10.194.173.163 with SMTP id bl3mr792239wjc.10.1389949446259; Fri, 17 Jan 2014 01:04:06 -0800 (PST) Received: from localhost.localdomain (AToulouse-654-1-359-206.w90-60.abo.wanadoo.fr. [90.60.118.206]) by mx.google.com with ESMTPSA id ju6sm8671745wjc.1.2014.01.17.01.04.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:04:05 -0800 (PST) From: Daniel Lezcano To: peterz@infradead.org, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, alex.shi@linaro.org Subject: [PATCH 1/4] sched: Remove 'cpu' parameter for idle_balance() Date: Fri, 17 Jan 2014 10:04:01 +0100 Message-Id: <1389949444-14821-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The cpu parameter passed to idle_balance is not needed as it could be retrieved from the struct rq. Signed-off-by: Daniel Lezcano --- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 3 ++- kernel/sched/sched.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 36c951b..cf51601 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2680,7 +2680,7 @@ need_resched: pre_schedule(rq, prev); if (unlikely(!rq->nr_running)) - idle_balance(cpu, rq); + idle_balance(rq); put_prev_task(rq, prev); next = pick_next_task(rq); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b24b6cf..d601df3 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6359,12 +6359,13 @@ out: * idle_balance is called by schedule() if this_cpu is about to become * idle. Attempts to pull tasks from other CPUs. */ -void idle_balance(int this_cpu, struct rq *this_rq) +void idle_balance(struct rq *this_rq) { struct sched_domain *sd; int pulled_task = 0; unsigned long next_balance = jiffies + HZ; u64 curr_cost = 0; + int this_cpu = this_rq->cpu; this_rq->idle_stamp = rq_clock(this_rq); diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index c2119fd..b0be4c6 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1176,7 +1176,7 @@ extern const struct sched_class idle_sched_class; extern void update_group_power(struct sched_domain *sd, int cpu); extern void trigger_load_balance(struct rq *rq); -extern void idle_balance(int this_cpu, struct rq *this_rq); +extern void idle_balance(struct rq *this_rq); extern void idle_enter_fair(struct rq *this_rq); extern void idle_exit_fair(struct rq *this_rq);