From patchwork Thu Jan 23 06:49:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 23567 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1A38323AE9 for ; Thu, 23 Jan 2014 06:50:22 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id q10sf3185100pdj.10 for ; Wed, 22 Jan 2014 22:50:21 -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:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=rsxzBVfeJtz6QropjnRMSGfZ/PYQ0VIlXSqgzYzKznQ=; b=Vv2mPInmGnW7TugrxU6y0ei3448DPWZV9hVpV/+t4eiYTJBXuy7SU5RkmRlWbbTfS0 vOWpOHh/xlI7LynRMmqGJMeNWHU1Yc3nWazLaz/7kS646urMEdfW9Kum10YW9c1Q1wpH L914aAQs/BeNsTXGlMel7eq0RVXQS9CHnU9/RR0+GZjDFw/5lB8ICYZq3KppRn8+2mRg 9GieUdr+afstPBssG+vh9qDdIDn+JfQ/00L0CAyhhgkFv0g7E2C7jKOfi2AdzFqwZs9o ZIg6b1Yl6vKPD7kAM3d1VYv9cFbs36P25OtLwh4GtkP/saySF+mg5Kn6SuAtxc1g2EJL G4SQ== X-Gm-Message-State: ALoCoQmtW8W0FyLAlpYwki4f767LGcbeeBWzKf49H1sEfyKUmPqg52etusWVbloyXdMztqPQ4/SZ X-Received: by 10.66.137.8 with SMTP id qe8mr79681pab.46.1390459821950; Wed, 22 Jan 2014 22:50:21 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.40 with SMTP id gb8ls252714qeb.27.gmail; Wed, 22 Jan 2014 22:50:21 -0800 (PST) X-Received: by 10.220.192.198 with SMTP id dr6mr3587825vcb.26.1390459821743; Wed, 22 Jan 2014 22:50:21 -0800 (PST) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id b2si6148224vcy.10.2014.01.22.22.50.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 22:50:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.49 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.49; Received: by mail-vb0-f49.google.com with SMTP id x14so808471vbb.36 for ; Wed, 22 Jan 2014 22:50:21 -0800 (PST) X-Received: by 10.58.188.20 with SMTP id fw20mr102799vec.54.1390459821651; Wed, 22 Jan 2014 22:50:21 -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 u4csp4700vcz; Wed, 22 Jan 2014 22:50:21 -0800 (PST) X-Received: by 10.68.241.134 with SMTP id wi6mr6352872pbc.44.1390459820550; Wed, 22 Jan 2014 22:50:20 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sj5si12832996pab.110.2014.01.22.22.50.19; Wed, 22 Jan 2014 22:50:19 -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 S1753350AbaAWGtl (ORCPT + 27 others); Thu, 23 Jan 2014 01:49:41 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35844 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbaAWGtk (ORCPT ); Thu, 23 Jan 2014 01:49:40 -0500 Received: by mail-pa0-f42.google.com with SMTP id kl14so1467493pab.29 for ; Wed, 22 Jan 2014 22:49:39 -0800 (PST) X-Received: by 10.68.237.228 with SMTP id vf4mr6279913pbc.131.1390459779606; Wed, 22 Jan 2014 22:49:39 -0800 (PST) Received: from [192.168.1.4] ([116.232.111.73]) by mx.google.com with ESMTPSA id g6sm57824834pat.2.2014.01.22.22.49.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 22:49:38 -0800 (PST) Message-ID: <52E0BB75.2080102@linaro.org> Date: Thu, 23 Jan 2014 14:49:25 +0800 From: Alex Shi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Jason Low , Peter Zijlstra CC: Ingo Molnar , morten.rasmussen@arm.com, vincent.guittot@linaro.org, daniel.lezcano@linaro.org, Mike Galbraith , wangyun@linux.vnet.ibm.com, Linux Kernel Mailing List Subject: Re: [PATCH 2/2] sched: add statistic for rq->max_idle_balance_cost References: <1390282399-17091-1-git-send-email-alex.shi@linaro.org> <1390282399-17091-2-git-send-email-alex.shi@linaro.org> <52DF802D.4030608@linaro.org> <20140122160901.GW13532@twins.programming.kicks-ass.net> <1390414208.2866.11.camel@j-VirtualBox> In-Reply-To: <1390414208.2866.11.camel@j-VirtualBox> 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.212.49 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: , On 01/23/2014 02:10 AM, Jason Low wrote: >>> > > P64(avg_idle); >>> > > + P64(max_idle_balance_cost); >>> > > #endif >>> > > P(ttwu_count); >> > >> > Not also the per-sd value in sd_alloc_ctl_domain_table() ? > Yeah, tracking the sd->max_newidle_lb_cost can also be useful. > > Thanks for suggestion! I thought the sd->max_newidle_lb_cost keep changing. But yes, it's still meaningful. BTW, in the pandaboard ES, sd balance cost is about 1~2ms. --- >From d37e712b623fb6776d0caba8e4bd06460e26b84e Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Tue, 21 Jan 2014 13:28:55 +0800 Subject: [PATCH] sched: add statistic for newidle load balance cost Tracking rq->max_idle_balance_cost and sd->max_newidle_lb_cost It's useful to track these values in debug mode. Signed-off-by: Alex Shi --- kernel/sched/core.c | 7 +++++-- kernel/sched/debug.c | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c3f3824..a046bc3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4293,7 +4293,7 @@ set_table_entry(struct ctl_table *entry, static struct ctl_table * sd_alloc_ctl_domain_table(struct sched_domain *sd) { - struct ctl_table *table = sd_alloc_ctl_entry(8); + struct ctl_table *table = sd_alloc_ctl_entry(9); if (table == NULL) return NULL; @@ -4313,7 +4313,10 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd) sizeof(int), 0644, proc_dointvec_minmax); set_table_entry(&table[6], "name", sd->name, CORENAME_MAX_SIZE, 0444, proc_dostring); - /* &table[7] is terminator */ + set_table_entry(&table[7], "max_newidle_lb_cost", + &sd->max_newidle_lb_cost, + sizeof(long), 0644, proc_doulongvec_minmax); + /* &table[8] is terminator */ return table; } diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 1e43e70..9ecd861 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -315,6 +315,7 @@ do { \ P(sched_goidle); #ifdef CONFIG_SMP P64(avg_idle); + P64(max_idle_balance_cost); #endif P(ttwu_count);