Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1384962imm; Tue, 5 Jun 2018 13:47:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLGfLmfCGqCDVZY1IGA9tVjMhQzNXRsqwi0Tzag3VphLGaTie29taxba0BuQ9FshIurmeD/ X-Received: by 2002:a65:6007:: with SMTP id m7-v6mr153048pgu.92.1528231651056; Tue, 05 Jun 2018 13:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528231651; cv=none; d=google.com; s=arc-20160816; b=M1oSpcgbn+m2X/BQFtyKQBWP3qAyseQKur7xGg9GlQDxmi0FM0i1sAw+9JVWJTT+JN 3+juqMED9Ztz8YPyG40XUM94o4LjHaHOuI3ClzfIDMKe2fpFrGuE7/nKrArXiIUVmRVU E2/QX06ao7phWHo0H0arCumuHzTRM+U1OrdoolA1UBRZOER5af3OADEUjwCJSS/OUOK/ IOZkx17UrXob9OJQNjFRCysSnxKddDEzVhWNGLY9GvDrnvywS6yowWbPHDoMqzYB1zwx 2sljQUzxlW4p7zJcPKKutOVhexTWUwOjCjA2INrgiwdUcuFmp6b+bI6vKirQxFARpT4i JInQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vcDSuD7aCFXu9vU7HMudpeL83+OaPDKd+n64Xc6gEIM=; b=KmDMbK5FwgT500vZHFRXv2dc3ytZxiXf01vbtFI/i4J0ZngR1roQTamwAo1zDkEbVy +47nqxI+pm0AXu89PXjJRug+6mCwTidh+3OHWN/ryatTAuQfSMiAA0Vk3hWvWnJ8/KPM Ys4Z/Ntwve8AXjtF4eKyOLjtgLWjePvxZd73GxCpg8VspD11eWxSc38J196IP93tVPgA Zsq/puehpWvpyHCn2BvNR28m/wzcg7CqMIggzGYQiZJIaj1SMAXIGMeoz9IQCf8/33xM f4fz/N5urBPExxjd23zDrAULeDlmK91Il5hZ04ARwPUfIIE9In2m3XASFtOgfH1DUL/M z+jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ZQFtlIIm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si48612363pld.11.2018.06.05.13.47.00; Tue, 05 Jun 2018 13:47:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ZQFtlIIm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163AbeFEUqL (ORCPT + 99 others); Tue, 5 Jun 2018 16:46:11 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:32885 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbeFEUqJ (ORCPT ); Tue, 5 Jun 2018 16:46:09 -0400 Received: by mail-pg0-f66.google.com with SMTP id e11-v6so1807856pgq.0 for ; Tue, 05 Jun 2018 13:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vcDSuD7aCFXu9vU7HMudpeL83+OaPDKd+n64Xc6gEIM=; b=ZQFtlIImgXyL32IFQ5Cd8s7wIsEaODLdntO862T/D0Z2eKLLT78W3++OmIGL3hE5tv +gTikw2LfoOnHcZZR0+wcCWODh845fsu1/+/iMcKlasFyfuJCnPbb7IWDcIk9Tk6mq+p UyWXvKdYwIFvHrrnexyt5w6Xt13xqOaaAy0sw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vcDSuD7aCFXu9vU7HMudpeL83+OaPDKd+n64Xc6gEIM=; b=O2rbELrJDohGYO9vTBix56EpstoypDTyIxgbRZ0ROoDM7qcQtnL/2MtU+3e8MsPbnU 50gTwdqOu/Xr9v1/AHW03JM6hNocvUe6+O5UTcf67zaCgO6JRw0yUh27SDLPPs/BF+Ib c47YS9amvF4JHuaBwrFQxVRq3SMJmNekQqqM2DalKZ18z0CKqUbygm2YPeJq94a+y006 D0mlIR2YEadeLxbqA5URcJpOR7UFQvyOk6ip66RrVjv5X3WwCeTwvnEETz9d5r4lcYyu pYQcW/4urrjx3S5LN60W65Zlak5d7a8fqZ9RFQg2VqJ+ug+a53CqnMQwZvL4t0d1hVn5 mC/A== X-Gm-Message-State: APt69E24fiH91h7jtj0Z8LzZfFXdQXr49zSP1B5DnHguJkbRi+M3UkfE zLoLE/xl+VCOpked6lGkH+l1Gs1VH6c= X-Received: by 2002:a62:4d02:: with SMTP id a2-v6mr192263pfb.2.1528231569370; Tue, 05 Jun 2018 13:46:09 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id a18-v6sm75971263pfn.117.2018.06.05.13.46.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 13:46:08 -0700 (PDT) Date: Tue, 5 Jun 2018 13:46:08 -0700 From: Joel Fernandes To: Patrick Bellasi Cc: Juri Lelli , Vincent Guittot , linux-kernel , "open list:THERMAL" , Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Dietmar Eggemann , Morten Rasmussen , connoro@google.com, Joel Fernandes , Steve Muckle , Todd Kjos Subject: Re: [PATCH 2/2] sched/fair: util_est: add running_sum tracking Message-ID: <20180605204608.GA3510@joelaf.mtv.corp.google.com> References: <20180604160600.22052-1-patrick.bellasi@arm.com> <20180604160600.22052-3-patrick.bellasi@arm.com> <20180605151129.GC32302@e110439-lin> <20180605153105.GM16081@localhost.localdomain> <20180605165431.GF32302@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180605165431.GF32302@e110439-lin> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 05, 2018 at 05:54:31PM +0100, Patrick Bellasi wrote: > On 05-Jun 17:31, Juri Lelli wrote: > > On 05/06/18 16:11, Patrick Bellasi wrote: > > > > [...] > > > > > If I run an experiment with your example above, while using the > > > performance governor to rule out any possible scale invariance > > > difference, here is what I measure: > > > > > > Task1 (40ms delayed by the following Task2): > > > mean std max > > > running_avg 455.387449 22.940168 492.0 > > > util_avg 433.233288 17.395477 458.0 > > > > > > Task2 (waking up at same time of Task1 and running before): > > > mean std max > > > running_avg 430.281834 22.405175 455.0 > > > util_avg 421.745331 22.098873 456.0 > > > > > > and if I compare Task1 above with another experiment where Task1 is > > > running alone: > > > > > > Task1 (running alone): > > > mean std min > > > running_avg 460.257895 22.103704 460.0 > > > util_avg 435.119737 17.647556 461.0 > > > > Wait, why again in this last case running_avg != util_avg? :) > > I _think_ it's mostly due to the rouding errors we have because of the > reasons I've explained in the reply to Joel: > > https://lkml.org/lkml/2018/6/5/559 > 20180605152156.GD32302@e110439-lin > > at the end, while commenting about the division overhead. > > I should try the above examples while tracking the full signal at > ___update_load_avg() time. Is that the only issue? I think if a CFS task is blocked by another CFS task due to preemption, then with your patch we would account the CFS blocked time as well into the blocked task's running utilization, which seems incorrect. Or did I miss something? thanks, - Joel