Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp121205imm; Tue, 5 Jun 2018 16:16:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKuWj40LsMjSyG3GCSmgTQX0M1HUeeIBuF651ZrhcKh09zAY7fuMrCGhQrBg8cvAprFPYMj X-Received: by 2002:a62:4a0c:: with SMTP id x12-v6mr592993pfa.142.1528240610890; Tue, 05 Jun 2018 16:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528240610; cv=none; d=google.com; s=arc-20160816; b=n5ww86iq1OOkuajAvdUf8lPaeTD/ApXPijZbxjYVmP+5c1tX6u8ABVYIOUajGTAHDu /XxuMiv8Unjzw54hcp6khXIH1pSVpfkOAeoKVMg5jiHUorc4V4mCjkfqXb+OA2exMJ7E 4waWbdsN/oBqaJNKCGE1w+Ix/ajZm7EhlNyfiIeBQJ10K9KLicPQYyZ5U324i3SVYB3q tglJbNDtAGD/T9baRHHjgEOVYZRSdLxFwAG0FJ4IcFA21CP8iSlIW+RJcpXjT6FJ4+Tk FLLXIP5Ag/6HR+3m41waE6EusCQHFPSnHq2eSXUYJL5lQSM+G7hvsgyUWq7sHKkgIr1O /WnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=4L33qbOW5xn+dgaHEGt0UwXMX5t67dfrp+ZUCXDWx80=; b=XLXiDuNXDg+IqoEOoVUlFuPMZklGcExoFb8jCNVJi5cw8Z63WQlOI2SV99YX+w7hGG rPh9f2khJZPD0h0biNZ0ZJLMNWjen7cH37J9WVhkqjqR/lizJ9fOdUy3DY9EiuD5MoNp 1friQeYU6wT0281EbmtjvfIMfy36DmEExZ/e04543FcZRYtEvHvBNnZtDcLm6cZ7Ujtq g2HNEXvKnfP1MQyGmIHLlQBdmeoakXT6KCt+RPujRjh/Ir8DbZop3Ej6AggP/oMj0P82 WVDOrxFbaJT8NmJ14c1n9fLuIv93PHE53g4Sbj7gVjMoJtbj/bLASVouqMqfAcc/NpEk Vc0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=QePHMhs5; dkim=pass header.i=@codeaurora.org header.s=default header.b=OshcHn0R; 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 n124-v6si4566063pga.311.2018.06.05.16.16.36; Tue, 05 Jun 2018 16:16:50 -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=@codeaurora.org header.s=default header.b=QePHMhs5; dkim=pass header.i=@codeaurora.org header.s=default header.b=OshcHn0R; 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 S932513AbeFEXPM (ORCPT + 99 others); Tue, 5 Jun 2018 19:15:12 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33114 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932352AbeFEXPD (ORCPT ); Tue, 5 Jun 2018 19:15:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3B18D607E8; Tue, 5 Jun 2018 23:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528240503; bh=IUrP0txM+95BxuPFf50xRmaFE2NVMxKTrnf+VQvAVwk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QePHMhs5xce8sCXXHVPl7sBQO42XyHqnpXVoVi+eEs5tPLMG+aPQI0XvlSAAIdW8t PcYdMsN24KAwKstGbBa78KgKu2Qc4/6AkLRUQ3K1cYorlw4uEF7csbJYbm0TfiEZNK A33uGOwHStTfbYHcAMLvJxRBcHLLbXtuWBwswq8E= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.134.64.210] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: skannan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id ACDB760555; Tue, 5 Jun 2018 23:15:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528240502; bh=IUrP0txM+95BxuPFf50xRmaFE2NVMxKTrnf+VQvAVwk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=OshcHn0RDEj4LUAbA3chVokZ2v4uku9Q9MnD/BERDhG0571nfS4DSP13hCFg5RsrB aVAj0SxhMBd4W716Pv0XAXkt/xd3DjlfyT3lRIEXEHy1vZxnLGGGC8ytRjyBICtA68 0klgFtjUBVFigc6iz3NlmLsHbPYb7w0rKUUkqBPU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ACDB760555 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=skannan@codeaurora.org Subject: Re: [PATCH 2/2] sched/fair: util_est: add running_sum tracking To: Joel Fernandes , 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 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> <20180605204608.GA3510@joelaf.mtv.corp.google.com> From: Saravana Kannan Message-ID: Date: Tue, 5 Jun 2018 16:15:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180605204608.GA3510@joelaf.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/05/2018 01:46 PM, Joel Fernandes wrote: > 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? This is my concern too. This will negatively affect any task packing because more tasks are going to be runnable but not running and that going to increase the over all frequency (I'm assuming you want to use this for frequency guidance eventually?). -Saravana -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project