From patchwork Mon Nov 3 16:54:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 40056 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 27A1521894 for ; Mon, 3 Nov 2014 16:58:03 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id ex7sf2993666wid.8 for ; Mon, 03 Nov 2014 08:58:02 -0800 (PST) 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=zpVcbaPUysYmFcUrFbkSOh4TkRzRBjWr/puCE7iIjA0=; b=Hj1my18cxYUaTxi0pykEfAaE+czPl/BaqzJe5086J3r3HGdbEDvUu951DinrdfH/TM xvs4it+S9JMmRJNVirJBQIGrEyqCNX21zX+uEZD0g94XxoZGZP+22glsaNORHLPsv02Y LeJVTAp+77Cso3pDyj/pRlpmVSQEbyQHg+60a2aY43FtjaoW0jHe0C26kWQfzB1bwMAa uYC+2bkfj1Q/0TWH4ZAS8c8eg1hXt9lGfh6J5vWIRUVefk32bVz591epBnUE8JHKQzWt VyM3fHsfejVXwWr74eIzsfX1V5y0SUs+TtGGhuEy5eXCabRDyQwVMY0Qta25K9UNhUN4 XpZQ== X-Gm-Message-State: ALoCoQm1TUst1SiaD0vxWem4b5jnL3fQQW7aYecuqqiyX3nJ1MZyN31qikPursmhiYjeT/haRNGR X-Received: by 10.180.81.5 with SMTP id v5mr898078wix.0.1415033882106; Mon, 03 Nov 2014 08:58:02 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.100 with SMTP id it4ls780980lac.7.gmail; Mon, 03 Nov 2014 08:58:01 -0800 (PST) X-Received: by 10.152.36.5 with SMTP id m5mr52197835laj.51.1415033881813; Mon, 03 Nov 2014 08:58:01 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id tb1si33162959lbb.130.2014.11.03.08.58.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Nov 2014 08:58:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id hs14so9846144lab.19 for ; Mon, 03 Nov 2014 08:58:01 -0800 (PST) X-Received: by 10.152.120.199 with SMTP id le7mr29507471lab.67.1415033881728; Mon, 03 Nov 2014 08:58:01 -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.112.141.34 with SMTP id rl2csp21188lbb; Mon, 3 Nov 2014 08:58:00 -0800 (PST) X-Received: by 10.66.122.2 with SMTP id lo2mr44534345pab.9.1415033879835; Mon, 03 Nov 2014 08:57:59 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id uy3si15788184pab.42.2014.11.03.08.57.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2014 08:57:59 -0800 (PST) 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 1XlKvd-0002Nc-6m; Mon, 03 Nov 2014 16:56:29 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XlKvY-0002G3-0V for linux-arm-kernel@lists.infradead.org; Mon, 03 Nov 2014 16:56:25 +0000 Received: by mail-wi0-f171.google.com with SMTP id q5so7058442wiv.10 for ; Mon, 03 Nov 2014 08:56:01 -0800 (PST) X-Received: by 10.180.206.14 with SMTP id lk14mr17599058wic.47.1415033761559; Mon, 03 Nov 2014 08:56:01 -0800 (PST) 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 s8sm22798078wjx.9.2014.11.03.08.55.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Nov 2014 08:56:00 -0800 (PST) From: Vincent Guittot To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com, Morten.Rasmussen@arm.com, kamalesh@linux.vnet.ibm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v9 02/10] sched: Track group sched_entity usage contributions Date: Mon, 3 Nov 2014 17:54:39 +0100 Message-Id: <1415033687-23294-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415033687-23294-1-git-send-email-vincent.guittot@linaro.org> References: <1415033687-23294-1-git-send-email-vincent.guittot@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141103_085624_203710_E3D909D3 X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. 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 [209.85.212.171 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.171 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, linaro-kernel@lists.linaro.org, Vincent Guittot , efault@gmx.de, Ben Segall , Paul Turner , Morten Rasmussen X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" 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.215.46 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 From: Morten Rasmussen Adds usage contribution tracking for group entities. Unlike se->avg.load_avg_contrib, se->avg.utilization_avg_contrib for group entities is the sum of se->avg.utilization_avg_contrib for all entities on the group runqueue. It is _not_ influenced in any way by the task group h_load. Hence it is representing the actual cpu usage of the group, not its intended load contribution which may differ significantly from the utilization on lightly utilized systems. cc: Paul Turner cc: Ben Segall Signed-off-by: Morten Rasmussen Signed-off-by: Vincent Guittot --- kernel/sched/debug.c | 2 ++ kernel/sched/fair.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index f384452..efb47ed 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -94,8 +94,10 @@ static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group P(se->load.weight); #ifdef CONFIG_SMP P(se->avg.runnable_avg_sum); + P(se->avg.running_avg_sum); P(se->avg.avg_period); P(se->avg.load_avg_contrib); + P(se->avg.utilization_avg_contrib); P(se->avg.decay_count); #endif #undef PN diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3a91ae6..a171e1b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2529,6 +2529,9 @@ static long __update_entity_utilization_avg_contrib(struct sched_entity *se) if (entity_is_task(se)) __update_task_entity_utilization(se); + else + se->avg.utilization_avg_contrib = + group_cfs_rq(se)->utilization_load_avg; return se->avg.utilization_avg_contrib - old_contrib; }