Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751085AbdHSE6g convert rfc822-to-8bit (ORCPT ); Sat, 19 Aug 2017 00:58:36 -0400 Received: from mout.gmx.net ([212.227.15.18]:50672 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbdHSE6f (ORCPT ); Sat, 19 Aug 2017 00:58:35 -0400 Message-ID: <1503118674.5112.20.camel@gmx.de> Subject: Re: [PATCH v2] sched/fair: Make PELT signal more accurate From: Mike Galbraith To: Joel Fernandes , linux-kernel@vger.kernel.org Cc: Vincent Guittot , Peter Zijlstra , Juri Lelli , Brendan Jackman , Dietmar Eggeman , kernel-team@android.com, Ingo Molnar Date: Sat, 19 Aug 2017 06:57:54 +0200 In-Reply-To: <20170818235026.618-1-joelaf@google.com> References: <20170818235026.618-1-joelaf@google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K0:72xZ5OucTK4LiLF55075opzvjMC13OI3QcfYx7I4gcwN43/0FRG pfRilDYfvYofgN76EulfkPOBEUPNVxPZChklMReOO31XyCP1+Ko5sT9uw1sUruL7UWouVgu 1dCD2Zu+m2UvgN3HOqfufKWY+SGItNTd3I7913DMsAdlqVVP7t7nQ7YgBtWWeysox99ilU0 lnTgaIfxT1sFFTCXmcDQA== X-UI-Out-Filterresults: notjunk:1;V01:K0:nEF7gch2SBs=:k6FmRajR5wYDnS30+mdgQt P3hHia/Nn7WBIrHEZ+48ou2hrPqC78FzU67Sh1oDwMNEXHH3u3GduXVBRuL6SvaTaD2nOhOBK I7HEhSeEJl0IELPUH6Wx4f03QdZryLIgNqmnrZ2UokRh7St1VjOe+tzD94ZSgWNnUvcGuSYJX rP0phA6NWRjFjeKb0TM8F6itYIP+QZ4rAvkdJi5/5bwst4o79GyukgAJY8HErjs1SvhDzSoCS /RM582ZoEdPhojVRpkTm4EKOMmrY7HFB5glad+gkemFoB2rF99MvQ5gJlVrpa1KJ/+i4vX+/d U1GmoqxsbWyCZZg6/kVnMNq03C/+Whwa2Ch7ET9Ei6NUWx36GEfokSKMcl3uMkyj1aGghv+RA nYcojZoFeItqbPObSj5A5yF+mZT/1tOA/+7iKFIxHoTtVAzZyxmpfclt0tRfgVOgUkOM7Qoah rmDNGJlhTTyR9L6BypWguAzllrCaVE4qHZdz1gR93z39k79TGC/0IUQVlnwZzJzmnSRrCiSpz /d8tOL2PIi8jAvfxcgjcb0O4HIktXfzuTyUbv0M/RWT6ArSpbgFk+q0fBPa6IKuvIgnb23+Qm EWum+uFiANHn0puxcKwvQ2Jtw5q5anQhRCGAXCUDflWVgjN52tvtqBXHjWtPEYfQ8qDq5sCH4 POcxHoI8oG0Kbg0SJDuVF7b+D3xNigixPi8qSjcAdJcOi++gjbFMl9Ntd/jwmOCU16/0h9udU VJi8A33XQ3HT5B9ugk2SP6tGeRt77XwPhlJ+uUQzWfITkrNyvZwA55CiU8j0KKlYkKm+sZJTl oM12w1o7HCKakRKzomGmfcHxafm89PBKuKzzmAALCLCCrDoz84= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1170 Lines: 21 On Fri, 2017-08-18 at 16:50 -0700, Joel Fernandes wrote: > The PELT signal (sa->load_avg and sa->util_avg) are not updated if the amount > accumulated during a single update doesn't cross a period boundary. This is > fine in cases where the amount accrued is much smaller than the size of a > single PELT window (1ms) however if the amount accrued is high then the > relative error (calculated against what the actual signal would be had we > updated the averages) can be high - as much 2% in my testing. On plotting > signals, I found that there are errors especially high when we update just > before the period boundary is hit. These errors can be significantly reduced if > we update the averages more often. > > Inorder to fix this, this patch does the average update by also checking how > much time has elapsed since the last update and update the averages if it has > been long enough (as a threshold I chose 512us). Ok, I gotta ask:  In order to fix what?  What exactly does the small but existent overhead increase buy us other than an ever so slightly different chart?  What is your motivation to care about a microscopic change in signal shape? -Mike