Message ID | 1406569906-9763-4-git-send-email-vincent.guittot@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBCPZXIGQSEHBBSU73KPAKGQENWF3T6Y@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BACBC202E4 for <linaro@patches.linaro.org>; Mon, 28 Jul 2014 18:00:43 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf54788961pab.8 for <linaro@patches.linaro.org>; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=tKOeI2nqMIq1V55AOfDamvPh7AAPS0Dg04SgCPbluGM=; b=eKoFTjkmSszewfaS/lNq8V4FOoJl0hUPmGTX+e4CFWmLCXss6FKMs58egCvg1PTJ5s nXWZe+Qj6JC9bEaA7U+INb8OPw/jjMRRt4lSP4nM4wfZ70mjcBHq30Ta5U64e1Sglqjf TE/we/vYjHejbsWF3EDbFR96h7USF2Us0gY4h4p9YOVzMXVQM3puo5dTaik2iRLXIXvq uxS9sNNWWmZZV+pQOtIJQD4xbYuOxTE0CFfg78OpU886YBVzYJcT8j39ekgP3ZOKubc/ NuvtIfLgofpGkgtDl6DHeLK6Ua4/awPpIQ1WauwV4yITpaMUw/4AOctp8Ajt/6v2tTpS 6VwA== X-Gm-Message-State: ALoCoQl7LI1YNzbY+AUK3ud7TwTnqiBZrblgWXrtFf0XqVMtRrv2z5CaSlPyzJ/laqEhbFedeax3 X-Received: by 10.67.5.71 with SMTP id ck7mr6559915pad.9.1406570442830; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.19.33 with SMTP id 30ls140244qgg.34.gmail; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) X-Received: by 10.220.196.147 with SMTP id eg19mr2554722vcb.60.1406570442647; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id dm6si12964698vcb.96.2014.07.28.11.00.42 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 11:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so11755611vcb.16 for <patchwork-forward@linaro.org>; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr2558736vcq.50.1406570442551; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) 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.221.37.5 with SMTP id tc5csp186300vcb; Mon, 28 Jul 2014 11:00:42 -0700 (PDT) X-Received: by 10.69.11.162 with SMTP id ej2mr3997492pbd.161.1406570085158; Mon, 28 Jul 2014 10:54:45 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ip4si18506683pbd.223.2014.07.28.10.54.39 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jul 2014 10:54:45 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XBp6t-0000NR-Eb; Mon, 28 Jul 2014 17:53:19 +0000 Received: from mail-we0-f180.google.com ([74.125.82.180]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XBp6f-0008RH-3U for linux-arm-kernel@lists.infradead.org; Mon, 28 Jul 2014 17:53:06 +0000 Received: by mail-we0-f180.google.com with SMTP id w61so7660494wes.11 for <linux-arm-kernel@lists.infradead.org>; Mon, 28 Jul 2014 10:52:41 -0700 (PDT) X-Received: by 10.194.134.228 with SMTP id pn4mr1540736wjb.111.1406569961150; Mon, 28 Jul 2014 10:52:41 -0700 (PDT) Received: from lmenx30s.lme.st.com (LPuteaux-656-01-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id ex4sm33758149wic.2.2014.07.28.10.52.39 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 10:52:40 -0700 (PDT) From: Vincent Guittot <vincent.guittot@linaro.org> To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 03/12] sched: fix avg_load computation Date: Mon, 28 Jul 2014 19:51:37 +0200 Message-Id: <1406569906-9763-4-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406569906-9763-1-git-send-email-vincent.guittot@linaro.org> References: <1406569906-9763-1-git-send-email-vincent.guittot@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140728_105305_332866_D8785FF7 X-CRM114-Status: GOOD ( 12.56 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.180 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.180 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: nicolas.pitre@linaro.org, riel@redhat.com, daniel.lezcano@linaro.org, Vincent Guittot <vincent.guittot@linaro.org>, efault@gmx.de, dietmar.eggemann@arm.com, linaro-kernel@lists.linaro.org, Morten.Rasmussen@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vincent.guittot@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 57f8d8c..647d0a6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4095,7 +4095,7 @@ static unsigned long capacity_of(int cpu) static unsigned long cpu_avg_load_per_task(int cpu) { struct rq *rq = cpu_rq(cpu); - unsigned long nr_running = ACCESS_ONCE(rq->nr_running); + unsigned long nr_running = ACCESS_ONCE(rq->cfs.h_nr_running); unsigned long load_avg = rq->cfs.runnable_load_avg; if (nr_running) @@ -5909,7 +5909,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, load = source_load(i, load_idx); sgs->group_load += load; - sgs->sum_nr_running += rq->nr_running; + sgs->sum_nr_running += rq->cfs.h_nr_running; if (rq->nr_running > 1) *overload = true;
The computation of avg_load and avg_load_per_task should only takes into account the number of cfs tasks. The non cfs task are already taken into account by decreasing the cpu's capacity and they will be tracked in the CPU's utilization (group_utilization) of the next patches Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)