From patchwork Tue Jan 28 17:16:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 23805 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F0AF4202B2 for ; Tue, 28 Jan 2014 17:34:03 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j5sf1280028qaq.2 for ; Tue, 28 Jan 2014 09:34:03 -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:message-id:user-agent :date:from:to:cc:subject:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe :content-disposition; bh=8sfHmAnfDhn22DBfLEWDP3wlnxWhXXytQQZR60+8HXk=; b=b306el8jv1gbt289oFmvlSROx4C+2r5mZn4zsDYy5ysqG20GmBScMWQCNZmVzME7wn biSKoH96dsDIBPY+EwgxvzzrLXPNfhY5yHEikPwKM6G9vqa1mp+Y3GL+aES4rj93BCm7 v/lVPAADbYHt6bPt0kWnAQ7ZIq3iB1UD65cZdtddVIxItTUNkmeKQMTywFI/Y0J7BQuN TCGoY6d1cQQIWxVlhnk0nOkkz8eWh8u3m4lWgRRUKqRe28cCwgHe1LoPda5trbgs+uGP CsOXiuFVtmjyxqaGwWG/p5Qs4BBRbu5LcoWLGEgdhY1/Ne4VgpDlGWgd4Lr0z2ROh7R7 MkMg== X-Gm-Message-State: ALoCoQl2hBDBRWxO6XU9V/e5syeIkAc1HFtdp2hS+EvTEWfD2aZJMlW+Zy3jaMK5YxmVtTJZgirY X-Received: by 10.236.86.77 with SMTP id v53mr826193yhe.41.1390930443043; Tue, 28 Jan 2014 09:34:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.138 with SMTP id c10ls2110232qga.62.gmail; Tue, 28 Jan 2014 09:34:02 -0800 (PST) X-Received: by 10.52.118.33 with SMTP id kj1mr788781vdb.33.1390930442739; Tue, 28 Jan 2014 09:34:02 -0800 (PST) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id at8si336140vec.113.2014.01.28.09.34.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Jan 2014 09:34:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id w8so451905vbj.9 for ; Tue, 28 Jan 2014 09:34:00 -0800 (PST) X-Received: by 10.52.111.38 with SMTP id if6mr1663753vdb.12.1390930440531; Tue, 28 Jan 2014 09:34:00 -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.220.174.196 with SMTP id u4csp48468vcz; Tue, 28 Jan 2014 09:33:59 -0800 (PST) X-Received: by 10.66.16.131 with SMTP id g3mr2828164pad.138.1390930439065; Tue, 28 Jan 2014 09:33:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sz7si16188705pab.174.2014.01.28.09.33.58; Tue, 28 Jan 2014 09:33:58 -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 S1755413AbaA1Rdu (ORCPT + 27 others); Tue, 28 Jan 2014 12:33:50 -0500 Received: from merlin.infradead.org ([205.233.59.134]:60565 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755151AbaA1Rdr (ORCPT ); Tue, 28 Jan 2014 12:33:47 -0500 Received: from dhcp-077-248-225-117.chello.nl ([77.248.225.117] helo=twins) by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1W8CXc-0002v8-LQ; Tue, 28 Jan 2014 17:33:40 +0000 Received: by twins (Postfix, from userid 0) id 21CB882785B3; Tue, 28 Jan 2014 18:33:38 +0100 (CET) Message-Id: <20140128171947.876341905@infradead.org> User-Agent: quilt/0.60-1 Date: Tue, 28 Jan 2014 18:16:35 +0100 From: Peter Zijlstra To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, daniel.lezcano@linaro.org, pjt@google.com, bsegall@google.com, Steven Rostedt , Vincent Guittot , Peter Zijlstra Subject: [PATCH 1/9] sched: Remove cpu parameter for idle_balance() References: <20140128171634.974847076@infradead.org> 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: peterz@infradead.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 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: , Content-Disposition: inline; filename=daniel_lezcano-1_sched-remove__cpu__parameter_for_idle_balance.patch From: Daniel Lezcano The cpu parameter passed to idle_balance is not needed as it could be retrieved from the struct rq. Cc: alex.shi@linaro.org Cc: peterz@infradead.org Cc: mingo@kernel.org Signed-off-by: Daniel Lezcano Signed-off-by: Peter Zijlstra --- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 3 ++- kernel/sched/sched.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) -- 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/ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2680,7 +2680,7 @@ static void __sched __schedule(void) 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); --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6359,12 +6359,13 @@ static int load_balance(int this_cpu, st * 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); --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1176,7 +1176,7 @@ extern const struct sched_class idle_sch 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);