From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481Ab2I3TTA (ORCPT ); Sun, 30 Sep 2012 15:19:00 -0400 Received: from smtp.getmail.no ([84.208.15.66]:38850 "EHLO smtp.getmail.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750727Ab2I3TS7 (ORCPT ); Sun, 30 Sep 2012 15:18:59 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: linux-kernel@vger.kernel.org Subject: Re: The 10ms averager in fair.c References: Date: Sun, 30 Sep 2012 21:18:57 +0200 From: Uwaysi Bin Kareem Message-id: In-reply-to: User-Agent: Opera Mail/11.10 (Linux) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just to illustrate, you have a filter that lasts 10ms, and a cpu process that lasts 100uS Original spike 5 | 4 | 3 | 2 | 1 | 0 | 0ms_______________________10ms Filtered spike 5 4 3 2 1 ..................... 0.. .. 0ms________________________10ms Not only is the filtered spike, much lower, but it lasts long beyond the 100uS spike. (10ms). Why would that be used in something that should represent cpu-usage? Peace Be With You. On Sun, 30 Sep 2012 13:44:14 +0200, Uwaysi Bin Kareem wrote: > Hiya. I just had an initial look at fair.c > > There seems to be a 10ms averager in there? > > You are aware that that means you work on delayed values? > > Isn`t that counterintuitive to the principle of sharing? > > That means short bursts of cpu-use will be filtered out, and given less > cpu time. > Starting applications won`t have their cpu-usage before 5ms, which is > quite a bit on modern machines. Well if you use a linearphase filter, I > don`t know what kind of averager you use. The best would ofcourse be to > use a minimalphase gaussian averager. Which might be overkill. Atleast a > one-pole iir, buf = buf + (-buf + in) * cut)); One pole IIRs also have a > better frequency response. > > When you are working with low-latencies, wouldn`t it be better if such > things are tuned for target latency. I think few care about latency > after 0.2ms. So say the filter should be set to 0.4ms max. > > Why would you want to filter cpu-usage also really? > > Peace Be With You. > > (please CC me.)