From patchwork Tue Jan 21 11:17:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 23431 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1C000203BE for ; Tue, 21 Jan 2014 11:30:52 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id c14sf3966263vea.7 for ; Tue, 21 Jan 2014 03:30:51 -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=L/1CgCXQDVRMtJLT8zQy+7kcuYmeHWSjFfbbSrEeme4=; b=KYHJOG8grdQ9O8Q1IfSAyJIOobsdMimwRp+xo7Il6GyVE09pnOh3Z9EScl91OxSnNu 18gshnSf6iqmjwatT08zXUk/EqYHhVaptvPtTsQQNlH5CrQPlD0i7VlovU1ljTQ5t2qM TW8BBhfHkpjk3nPRA6WcjyiWrzosNL/Fe8zPVb45GuImzOBNdb28Uy7Dg+KgGrZwN/aZ tK4yNq//MGpdtZYY8Wu2O5RdRoYvTIfQRGVIZFn5KdvtkZ9u4Lds+ZKX0jxZpJbGV+YE SFrvUuRSEjiO9+N9SpSK90WXUeoTakPOl3OYTPZlDESiyTUQ+6CzHCtdf07cW6jlJKDS NYXA== X-Gm-Message-State: ALoCoQlqPow+7O/AuhZkwOwhedQlj8LgxhX+Roau/dUEPuLZDSGZwXOk7Ri2PmMDmFE2+ZQF8aFv X-Received: by 10.58.221.74 with SMTP id qc10mr2920207vec.35.1390303851285; Tue, 21 Jan 2014 03:30:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.132.231 with SMTP id ox7ls1976943qeb.49.gmail; Tue, 21 Jan 2014 03:30:51 -0800 (PST) X-Received: by 10.58.90.202 with SMTP id by10mr13524690veb.6.1390303851189; Tue, 21 Jan 2014 03:30:51 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ec16si1842783veb.86.2014.01.21.03.30.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 03:30:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id im17so3372927vcb.5 for ; Tue, 21 Jan 2014 03:30:51 -0800 (PST) X-Received: by 10.58.106.70 with SMTP id gs6mr1189319veb.28.1390303851117; Tue, 21 Jan 2014 03:30:51 -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 u4csp111108vcz; Tue, 21 Jan 2014 03:30:50 -0800 (PST) X-Received: by 10.68.190.228 with SMTP id gt4mr24544061pbc.94.1390303848572; Tue, 21 Jan 2014 03:30:48 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx4si5064632pbc.165.2014.01.21.03.30.47; Tue, 21 Jan 2014 03:30:47 -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 S1754548AbaAUL3t (ORCPT + 27 others); Tue, 21 Jan 2014 06:29:49 -0500 Received: from merlin.infradead.org ([205.233.59.134]:51884 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754364AbaAUL31 (ORCPT ); Tue, 21 Jan 2014 06:29:27 -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 1W5ZWC-0002WX-An; Tue, 21 Jan 2014 11:29:20 +0000 Received: by twins (Postfix, from userid 0) id DE1D18278840; Tue, 21 Jan 2014 12:29:03 +0100 (CET) Message-Id: <20140121112258.274565098@infradead.org> User-Agent: quilt/0.60-1 Date: Tue, 21 Jan 2014 12:17:55 +0100 From: Peter Zijlstra To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, daniel.lezcano@linaro.org, pjt@google.com, bsegall@google.com, Peter Zijlstra Subject: [PATCH 1/9] sched: Remove cpu parameter for idle_balance() References: <20140121111754.580142558@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.220.174 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 Link: http://lkml.kernel.org/r/1389949444-14821-1-git-send-email-daniel.lezcano@linaro.org --- 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);