From patchwork Thu Feb 6 23:10:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 24267 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D8D6920445 for ; Thu, 6 Feb 2014 23:11:03 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id m10sf5724244vbh.8 for ; Thu, 06 Feb 2014 15:11: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:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=u5po/Z5zZEHPHZY/mKj3kwcOM8osr9kAq05cOcnJ0zs=; b=OZlGL+QDaBPbCd56RthyeX90nwiemT3chmQiOJaKAaB8B+LctYF/Bzthb2Dy7xz14y vYv0NOTdxLngNkGUmqNyqvmExqtEjPblYf3d2+6TlS2226k54MDRl6I2e+SLa+44LnAp 4orAvSxY8LQyi9YClPVS+8R5dLdvthg4cYFYAqTVfNKD2JE1hlJai/t68Kv+s1rPzbdS jlrfUXv+VZlRCI9DDVceMvNxcpjlWQbXOTmPxOIde5cESaR4pti1RHcP3NWOO0eVNhKa dcRYZkcqwtgo5ZduRBFq8x1oqswkbRefkpF97OEZcr9cqZPSqlJTRrXAiDf8ZxjWp6tg 6fOw== X-Gm-Message-State: ALoCoQlpaxRGQQzdI5eNPsA9zZL9VBiVwAJQ2Vf4KPUveRE80bfYVqsVv3iG0hSG3ucP6M7h/kdN X-Received: by 10.58.230.72 with SMTP id sw8mr2598943vec.5.1391728263022; Thu, 06 Feb 2014 15:11:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.200 with SMTP id p66ls799853qgp.74.gmail; Thu, 06 Feb 2014 15:11:02 -0800 (PST) X-Received: by 10.52.116.71 with SMTP id ju7mr2905591vdb.31.1391728262843; Thu, 06 Feb 2014 15:11:02 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id a5si666152vez.120.2014.02.06.15.11.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Feb 2014 15:11:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so2070290vcb.1 for ; Thu, 06 Feb 2014 15:11:02 -0800 (PST) X-Received: by 10.52.61.168 with SMTP id q8mr1941506vdr.40.1391728262730; Thu, 06 Feb 2014 15:11:02 -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 u4csp52571vcz; Thu, 6 Feb 2014 15:11:02 -0800 (PST) X-Received: by 10.66.155.133 with SMTP id vw5mr3663543pab.124.1391728260891; Thu, 06 Feb 2014 15:11:00 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xk2si2630146pab.245.2014.02.06.15.11.00; Thu, 06 Feb 2014 15:11:00 -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 S1754745AbaBFXKr (ORCPT + 27 others); Thu, 6 Feb 2014 18:10:47 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:38294 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751297AbaBFXKp (ORCPT ); Thu, 6 Feb 2014 18:10:45 -0500 Received: by mail-wg0-f42.google.com with SMTP id l18so291837wgh.1 for ; Thu, 06 Feb 2014 15:10:44 -0800 (PST) X-Received: by 10.180.87.232 with SMTP id bb8mr1415994wib.48.1391728244336; Thu, 06 Feb 2014 15:10:44 -0800 (PST) Received: from mai.arqiva.lan (host-231-197-68-109.arq1.ldn.uk.sharedband.net. [109.68.197.231]) by mx.google.com with ESMTPSA id fm3sm2675334wib.8.2014.02.06.15.10.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Feb 2014 15:10:43 -0800 (PST) From: Daniel Lezcano To: peterz@infradead.org, mingo@kernel.org Cc: alex.shi@linaro.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org Subject: [PATCH V2 1/3] sched: Remove cpu parameter for idle_balance() Date: Thu, 6 Feb 2014 23:10:35 +0000 Message-Id: <1391728237-4441-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1391728237-4441-1-git-send-email-daniel.lezcano@linaro.org> References: <1391728237-4441-1-git-send-email-daniel.lezcano@linaro.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: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 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. Cc: alex.shi@linaro.org Cc: peterz@infradead.org Cc: mingo@kernel.org Signed-off-by: Daniel Lezcano Signed-off-by: Peter Zijlstra Reviewed-by: Alex Shi --- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 3 ++- kernel/sched/sched.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 210a12a..16b97dd 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2705,7 +2705,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 4caa803..428bc9d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6531,12 +6531,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..1436219 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1176,14 +1176,14 @@ 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); #else /* CONFIG_SMP */ -static inline void idle_balance(int cpu, struct rq *rq) +static inline void idle_balance(struct rq *rq) { }