From patchwork Mon Feb 17 01:55:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 24728 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7F157203BE for ; Mon, 17 Feb 2014 01:57:35 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g12sf61738235oah.10 for ; Sun, 16 Feb 2014 17:57:34 -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=CvPsBvucNEz4Qp0ZC6PgolMdklxXClucHFXsSBAIolI=; b=ZfnyDSIUSYaGhXISyjnOghdUO355MNRkKtQgMolFRCT1VKEN/xK3W0fMO7wyKqx37u iEkg4Mxbw5GwoCcYFC9hw0E9WsuD7my5/vY4MjxIPQ1DK6w/ansc4RDIzzRPizhAxi+i rfZWjpjnod2d1Azu8TmKrZk0lG93vBQAw9Dm1MtzxTL50YkD8WIEk5rdEDFVUd1QUk6Y P5KX4NOa+16YBZbow2mT/ug7SFU2Ne3uDCb6dO8XtUfm3dYSMozPKboqXiMrQOzKDAXB lIcm0KDNRA2F33bul/0oiU7H0OGPWoVzgaB1catQOgCokPtq27134hDAeeZVk57F3E+F wsxg== X-Gm-Message-State: ALoCoQnnRa6nTGpu2RDRr6gTSj2dVLpXtaYtmnChuGakc9n5v8bxgLNYV3vtwm5Gm28eEzQgpElf X-Received: by 10.182.98.230 with SMTP id el6mr9100399obb.10.1392602254648; Sun, 16 Feb 2014 17:57:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.165 with SMTP id x34ls718589qgx.53.gmail; Sun, 16 Feb 2014 17:57:34 -0800 (PST) X-Received: by 10.221.55.199 with SMTP id vz7mr213049vcb.40.1392602254560; Sun, 16 Feb 2014 17:57:34 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id n8si4165871vdv.42.2014.02.16.17.57.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Feb 2014 17:57:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id db12so11309521veb.39 for ; Sun, 16 Feb 2014 17:57:34 -0800 (PST) X-Received: by 10.220.131.210 with SMTP id y18mr15231746vcs.12.1392602254458; Sun, 16 Feb 2014 17:57:34 -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 u4csp102428vcz; Sun, 16 Feb 2014 17:57:34 -0800 (PST) X-Received: by 10.68.234.230 with SMTP id uh6mr409107pbc.161.1392602253624; Sun, 16 Feb 2014 17:57:33 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si13048875pbf.151.2014.02.16.17.57.32; Sun, 16 Feb 2014 17:57:33 -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 S1754067AbaBQB50 (ORCPT + 27 others); Sun, 16 Feb 2014 20:57:26 -0500 Received: from mail-pd0-f179.google.com ([209.85.192.179]:56059 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbaBQB5X (ORCPT ); Sun, 16 Feb 2014 20:57:23 -0500 Received: by mail-pd0-f179.google.com with SMTP id fp1so13912076pdb.10 for ; Sun, 16 Feb 2014 17:57:22 -0800 (PST) X-Received: by 10.66.139.130 with SMTP id qy2mr23262778pab.73.1392602242629; Sun, 16 Feb 2014 17:57:22 -0800 (PST) Received: from localhost.localdomain ([116.232.92.15]) by mx.google.com with ESMTPSA id eo11sm104524083pac.0.2014.02.16.17.57.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Feb 2014 17:57:21 -0800 (PST) From: Alex Shi To: mingo@redhat.com, peterz@infradead.org, morten.rasmussen@arm.com Cc: vincent.guittot@linaro.org, daniel.lezcano@linaro.org, fweisbec@gmail.com, linux@arm.linux.org.uk, tony.luck@intel.com, fenghua.yu@intel.com, james.hogan@imgtec.com, alex.shi@linaro.org, jason.low2@hp.com, viresh.kumar@linaro.org, hanjun.guo@linaro.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, akpm@linux-foundation.org, arjan@linux.intel.com, pjt@google.com, fengguang.wu@intel.com, linaro-kernel@lists.linaro.org, wangyun@linux.vnet.ibm.com Subject: [PATCH v2 08/11] sched: remove weighted_load() Date: Mon, 17 Feb 2014 09:55:14 +0800 Message-Id: <1392602117-20773-9-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1392602117-20773-1-git-send-email-alex.shi@linaro.org> References: <1392602117-20773-1-git-send-email-alex.shi@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: alex.shi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 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: , Although weighted_load is a inline founction, it's not needed in fact. so remove it. Signed-off-by: Alex Shi --- kernel/sched/fair.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5cdc838..6c37ee1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3939,31 +3939,16 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) } #ifdef CONFIG_SMP -/* Used instead of source_load when we know the type == 0 */ -static inline unsigned long weighted_cpuload(const int cpu) -{ - return cpu_rq(cpu)->cfs.runnable_load_avg; -} - -/* - * Return a low guess at the load of a migration-source cpu weighted - * according to the scheduling class and "nice" value. - * - * We want to under-estimate the load of migration sources, to - * balance conservatively. - */ +/* Return the real load of 'cpu' */ static unsigned long source_load(int cpu) { - return weighted_cpuload(cpu); + return cpu_rq(cpu)->cfs.runnable_load_avg; } -/* - * Return a high guess at the load of a migration-target cpu weighted - * according to the scheduling class and "nice" value. - */ +/* Return a high bias at the load of a migration-target cpu weighted */ static unsigned long target_load(int cpu, int imbalance_pct) { - unsigned long total = weighted_cpuload(cpu); + unsigned long total = cpu_rq(cpu)->cfs.runnable_load_avg; if (!sched_feat(LB_BIAS)) return total;