From patchwork Tue Feb 25 01:50:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 25229 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF1AE2066E for ; Tue, 25 Feb 2014 01:53:03 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf23481713oag.0 for ; Mon, 24 Feb 2014 17:53: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=3Q3sYI8jpQ+/SS7PPUVXvz+qudwRC8ZF2r07CAPGac0=; b=U8dEqYIf4NSFAurzsWb+cXqLeC3GUFV1pUYghgd+47qCYveQw+mkXQJnuMwE+aP+R3 yaIq4vxa6PZCbUjlgsKRz+iVKB7/29E4aPJtiwOXDibfn0NVnOS9xPMxJuI2KlZKOD6b 4tf9Pcl8Afvukmw5bOrRNOW9Ydq6Ldo+KH6lIaTsBdu8FfHJtiIvbJvmDhZ9JtxzeHKz x/OfduG/LNjIsYlt70ZypfmdEbiD0hxtQuAprMYaGOkoepYEyfv/O0G+YYLHqdefMRna 1i/kZYwieDQFuAAe0EKEtaUvqis3snxO2vHvsFwo+fZIW3g1hciUz3XFuVa94olBNURR PdYg== X-Gm-Message-State: ALoCoQnUT2OmxyugVlimurFohRCfxrZse1idcGDIEliBOBZSzimJBq8xKvt63xxt97rCFLYPK6Tf X-Received: by 10.182.66.137 with SMTP id f9mr10796636obt.3.1393293183244; Mon, 24 Feb 2014 17:53:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.101 with SMTP id y92ls2146083qgy.92.gmail; Mon, 24 Feb 2014 17:53:03 -0800 (PST) X-Received: by 10.52.30.167 with SMTP id t7mr12563902vdh.36.1393293183112; Mon, 24 Feb 2014 17:53:03 -0800 (PST) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id i1si6419220vcl.81.2014.02.24.17.53.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 17:53:03 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id ld13so6550307vcb.4 for ; Mon, 24 Feb 2014 17:53:03 -0800 (PST) X-Received: by 10.58.229.4 with SMTP id sm4mr340723vec.10.1393293183020; Mon, 24 Feb 2014 17:53:03 -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 u4csp103214vcz; Mon, 24 Feb 2014 17:53:01 -0800 (PST) X-Received: by 10.68.133.138 with SMTP id pc10mr3282696pbb.98.1393293181248; Mon, 24 Feb 2014 17:53:01 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wh4si1807350pbc.207.2014.02.24.17.53.00; Mon, 24 Feb 2014 17:53: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 S1753508AbaBYBwq (ORCPT + 26 others); Mon, 24 Feb 2014 20:52:46 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:54549 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753357AbaBYBwn (ORCPT ); Mon, 24 Feb 2014 20:52:43 -0500 Received: by mail-pd0-f178.google.com with SMTP id fp1so7074559pdb.23 for ; Mon, 24 Feb 2014 17:52:43 -0800 (PST) X-Received: by 10.68.99.194 with SMTP id es2mr3316149pbb.100.1393293163145; Mon, 24 Feb 2014 17:52:43 -0800 (PST) Received: from localhost.localdomain ([116.232.61.20]) by mx.google.com with ESMTPSA id q7sm4499844pbc.20.2014.02.24.17.52.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 17:52:42 -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, mgorman@suse.de Subject: [PATCH 08/11] sched: replace target_load by biased_load Date: Tue, 25 Feb 2014 09:50:51 +0800 Message-Id: <1393293054-11378-9-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1393293054-11378-1-git-send-email-alex.shi@linaro.org> References: <1393293054-11378-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.220.173 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: , There is no source_load now, It is better to change the target_load function name to original meaning: biased_load. Suggested-by: Morten Rasmussen Signed-off-by: Alex Shi --- kernel/sched/fair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5feb51b..b8423dc 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1015,7 +1015,7 @@ bool should_numa_migrate_memory(struct task_struct *p, struct page * page, } static unsigned long weighted_cpuload(const int cpu); -static unsigned long target_load(int cpu, int imbalance_pct); +static unsigned long biased_load(int cpu, int imbalance_pct); static unsigned long power_of(int cpu); static long effective_load(struct task_group *tg, int cpu, long wl, long wg); @@ -3958,7 +3958,7 @@ static unsigned long weighted_cpuload(const int cpu) * Return a high guess at the load of a migration-target cpu weighted * according to the runnable time and "nice" value. */ -static unsigned long target_load(int cpu, int imbalance_pct) +static unsigned long biased_load(int cpu, int imbalance_pct) { unsigned long total = weighted_cpuload(cpu); @@ -4286,7 +4286,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu) if (local_group) load = weighted_cpuload(i); else - load = target_load(i, imbalance); + load = biased_load(i, imbalance); avg_load += load; } @@ -5737,7 +5737,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, /* Bias balancing toward cpus of our domain */ if (local_group && env->idle != CPU_IDLE) - load = target_load(i, bias); + load = biased_load(i, bias); else load = weighted_cpuload(i);