From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997AbbIKQgA (ORCPT ); Fri, 11 Sep 2015 12:36:00 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:57658 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbbIKQf7 convert rfc822-to-8bit (ORCPT ); Fri, 11 Sep 2015 12:35:59 -0400 Subject: Re: [PATCH 4/6] sched/fair: Name utilization related data and functions consistently To: Vincent Guittot , Morten Rasmussen References: <1439569394-11974-1-git-send-email-morten.rasmussen@arm.com> <1439569394-11974-5-git-send-email-morten.rasmussen@arm.com> Cc: Peter Zijlstra , "mingo@redhat.com" , Daniel Lezcano , Yuyang Du , Michael Turquette , "rjw@rjwysocki.net" , Juri Lelli , Sai Charan Gurrappadi , "pang.xunlei@zte.com.cn" , linux-kernel From: Dietmar Eggemann Message-ID: <55F302EB.9020307@arm.com> Date: Fri, 11 Sep 2015 17:35:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: X-OriginalArrivalTime: 11 Sep 2015 16:35:56.0600 (UTC) FILETIME=[EEF1CB80:01D0ECAF] X-MC-Unique: UP4KVBheQ-a12R8i3w4vpg-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/09/15 10:08, Vincent Guittot wrote: > On 14 August 2015 at 18:23, Morten Rasmussen wrote: >> From: Dietmar Eggemann >> >> Use the advent of the per-entity load tracking rewrite to streamline the >> naming of utilization related data and functions by using >> {prefix_}util{_suffix} consistently. Moreover call both signals >> ({se,cfs}.avg.util_avg) utilization. > > I don't have a strong opinion about the naming of this variable but I > remember a discussion about this topic: > https://lkml.org/lkml/2014/9/11/474 : "Call the pure running number > 'utilization' and this scaled with capacity 'usage' " > > The utilization has been shorten to util with the rewrite of the pelt, > so the current use of usage in get_cpu_usage still follows this rule. But since we now do the capacity scaling in __update_load_avg() util_sum += t * scale_freq/SCHED_CAP_SCALE * arch_scale_freq_capacity() util_avg = util_sum / LOAD_AVG_MAX; we could either name everything 'util' or everything 'usage' (including the utilization sum and avg in struct sched_avg). > > So why do you want to change that now ? > Furthermore, cfs.avg.util_avg is a load whereas sgs->group_util is a > capacity. Both don't use the same unit and same range which can be > confusing when you read the code [...]