Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754240AbcDNMwu (ORCPT ); Thu, 14 Apr 2016 08:52:50 -0400 Received: from foss.arm.com ([217.140.101.70]:42315 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753531AbcDNMwq (ORCPT ); Thu, 14 Apr 2016 08:52:46 -0400 Subject: Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue To: Yuyang Du , Vincent Guittot References: <1460327765-18024-1-git-send-email-yuyang.du@intel.com> <1460327765-18024-3-git-send-email-yuyang.du@intel.com> <570E61FE.4060000@arm.com> <20160413184412.GO8697@intel.com> Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , Benjamin Segall , Paul Turner , Morten Rasmussen , Juri Lelli From: Dietmar Eggemann Message-ID: <570F929B.1070805@arm.com> Date: Thu, 14 Apr 2016 13:52:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160413184412.GO8697@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 39 On 13/04/16 19:44, Yuyang Du wrote: > On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: [...] > By "bailing out", you mean return without update because the delta is less > than 1ms? yes. > >>> Examples of 1 periodic task pinned to a cpu on an ARM64 system, HZ=250 >>> in steady state: >>> >>> (1) task runtime = 100us period = 200us >>> >>> pelt load/util signal >>> >>> 1us: 488-491 >>> >>> 1ms: 483-534 > > 100us/200us = 50%, so the util should center around 512, it seems in this > regard, it is better, but the variance is undesirable. I see. You mentioned the over-decay thing in the patch header. Is this also why you change the contribution of the most recent period from 1002 (1024*y) to 1024? This variance gets worse if the ratio runtime/period is further reduced (e.g. 25us/1000us). You can even create tasks which go stealth mode (e.g. 25us/1048us). It shows periods of 0 load/util (~1.55s) and than massive spikes (~700 for ~300ms). The short runtime and the task period synced to 1024*1024ns allow that we hit consecutive enqueues or dequeues for a long time even the task might drift relative to the pelt window. [...]