From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932212AbbCCMv3 (ORCPT ); Tue, 3 Mar 2015 07:51:29 -0500 Received: from service87.mimecast.com ([91.220.42.44]:36836 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756602AbbCCMv2 convert rfc822-to-8bit (ORCPT ); Tue, 3 Mar 2015 07:51:28 -0500 Message-ID: <54F5AE4F.20602@arm.com> Date: Tue, 03 Mar 2015 12:51:27 +0000 From: Dietmar Eggemann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Vincent Guittot , "peterz@infradead.org" , "mingo@kernel.org" , "linux-kernel@vger.kernel.org" , "preeti@linux.vnet.ibm.com" , Morten Rasmussen , "kamalesh@linux.vnet.ibm.com" CC: "riel@redhat.com" , "efault@gmx.de" , "nicolas.pitre@linaro.org" , "linaro-kernel@lists.linaro.org" , Paul Turner , Ben Segall Subject: Re: [PATCH v10 04/11] sched: Make sched entity usage tracking scale-invariant References: <1425052454-25797-1-git-send-email-vincent.guittot@linaro.org> <1425052454-25797-5-git-send-email-vincent.guittot@linaro.org> In-Reply-To: <1425052454-25797-5-git-send-email-vincent.guittot@linaro.org> X-OriginalArrivalTime: 03 Mar 2015 12:51:22.0777 (UTC) FILETIME=[C09B9090:01D055B0] X-MC-Unique: 115030312512508601 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/02/15 15:54, Vincent Guittot wrote: > From: Morten Rasmussen > > Apply frequency scale-invariance correction factor to usage tracking. > Each segment of the running_load_avg geometric series is now scaled by the The same comment I sent out on [PATCH v10 07/11]: The use of underscores in running_load_avg implies to me that this is a data member of struct sched_avg or something similar. But there is no running_load_avg in the current code. However, I can see that sched_avg::*running_avg_sum* (and therefore cfs_rq::*utilization_load_avg*) are frequency scale invariant. -- Dietmar > current frequency so the utilization_avg_contrib of each entity will be > invariant with frequency scaling. As a result, utilization_load_avg which is > the sum of utilization_avg_contrib, becomes invariant too. So the usage level > that is returned by get_cpu_usage, stays relative to the max frequency as the > cpu_capacity which is is compared against. > Then, we want the keep the load tracking values in a 32bits type, which implies > that the max value of {runnable|running}_avg_sum must be lower than > 2^32/88761=48388 (88761 is the max weigth of a task). As LOAD_AVG_MAX = 47742, > arch_scale_freq_capacity must return a value less than > (48388/47742) << SCHED_CAPACITY_SHIFT = 1037 (SCHED_SCALE_CAPACITY = 1024). > So we define the range to [0..SCHED_SCALE_CAPACITY] in order to avoid overflow.