From patchwork Fri Feb 27 15:54:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 45256 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 55B2120674 for ; Fri, 27 Feb 2015 16:02:01 +0000 (UTC) Received: by wiwh11 with SMTP id h11sf861017wiw.1 for ; Fri, 27 Feb 2015 08:02:00 -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=oCt72Dt+MAXUGxcJJ1kiFZzmXQb0uy28SG7/Ge0LPEU=; b=B1J8xRiWsHpOyEhYHf6bXE6wPV7AYR7NAgLxXZhX9Grt9gxriIMy8xfGC6Czox7Lpu zbAPhtzdzusG+bps+6IraDBv2k4Vv4HcQ07VaLWS4Q7yIVSef/nV/zdGvWahWIXH2f8w Ib8HYJZppyh+gc8HGSOUosOlJlgbAP4vZ4a56kzAFTn7i5HzRtn6d/rctopNOPeTug5X sL0fdBZQIFBQarTOFm8qjjmROJuaXWjWU99/7vWCXChxoHUnHZZTLL9usL9Ul8wQYvEm bGI6FAqb3i0RnCGisCp+m15PYWwPM8YrUqsWv1IvH0K6He/OsslJ53mcsUBk4WaoaL1F PANQ== X-Gm-Message-State: ALoCoQkMhfUELNjlyfD/QVcvJfGHwKLLTTv2CdtDaffpLp/BGzZo2yKz1YNn2+GzJArfY06Q/LjH X-Received: by 10.112.50.106 with SMTP id b10mr2156443lbo.8.1425052920663; Fri, 27 Feb 2015 08:02:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.199 with SMTP id s7ls159044laj.57.gmail; Fri, 27 Feb 2015 08:02:00 -0800 (PST) X-Received: by 10.112.147.130 with SMTP id tk2mr1031154lbb.24.1425052920422; Fri, 27 Feb 2015 08:02:00 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id l8si3220780lag.68.2015.02.27.08.02.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 08:02:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labgm9 with SMTP id gm9so18501234lab.2 for ; Fri, 27 Feb 2015 08:02:00 -0800 (PST) X-Received: by 10.152.179.172 with SMTP id dh12mr12913743lac.76.1425052920241; Fri, 27 Feb 2015 08:02:00 -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.35.133 with SMTP id h5csp4031785lbj; Fri, 27 Feb 2015 08:01:59 -0800 (PST) X-Received: by 10.66.122.69 with SMTP id lq5mr25538561pab.52.1425052918260; Fri, 27 Feb 2015 08:01:58 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u14si2862820pdi.41.2015.02.27.08.01.56; Fri, 27 Feb 2015 08:01:58 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754802AbbB0PzJ (ORCPT + 28 others); Fri, 27 Feb 2015 10:55:09 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:43347 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbbB0PzG (ORCPT ); Fri, 27 Feb 2015 10:55:06 -0500 Received: by wesu56 with SMTP id u56so21192223wes.10 for ; Fri, 27 Feb 2015 07:55:04 -0800 (PST) X-Received: by 10.181.8.75 with SMTP id di11mr7902621wid.26.1425052504567; Fri, 27 Feb 2015 07:55:04 -0800 (PST) Received: from lmenx30s.lme.st.com (LPuteaux-656-1-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id y3sm6519459wju.14.2015.02.27.07.55.02 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Feb 2015 07:55:03 -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 Cc: riel@redhat.com, efault@gmx.de, nicolas.pitre@linaro.org, dietmar.eggemann@arm.com, linaro-kernel@lists.linaro.org, Morten Rasmussen , Paul Turner , Ben Segall , Vincent Guittot Subject: [PATCH v10 02/11] sched: Track group sched_entity usage contributions Date: Fri, 27 Feb 2015 16:54:05 +0100 Message-Id: <1425052454-25797-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425052454-25797-1-git-send-email-vincent.guittot@linaro.org> References: <1425052454-25797-1-git-send-email-vincent.guittot@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: 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.43 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 578ff83..a245c1f 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 414408dd..d94a865 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2747,6 +2747,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; }