Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1327931imm; Tue, 5 Jun 2018 12:44:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI4/BVVnk7w4FIeCpfpUjM0M9ArMhqLJXHkAKtOXLHn2BnM6b+DKNpctC2pMB1hgQrOU05Z X-Received: by 2002:a17:902:8602:: with SMTP id f2-v6mr2027plo.5.1528227877139; Tue, 05 Jun 2018 12:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528227877; cv=none; d=google.com; s=arc-20160816; b=gjqI3C8uHaWlG3OWPYa8HdYt5g2dBfirWshFwM8XyDBbBOYvXzamB7ohwPztYwQL34 LGppQcZEuj/8Q/hz9say4HF9OlBFpNc18T/53MHOsB0uC+6LjjbCL4988olSqk1u0twU K7GF5J7/DmfDA+bR4d0bpvr3WOWS4mcZsh3oOcxtHS+K0c29JXkhlaoH/fHjzmsWQ4LI QShdQjfS6Lh0HVvV12hmusvTE6xwaOmLAkmnx3UmiPEmCAku9dLufGErgmGpScrn6Hev ZLTQeo7BCnCou1Re+BNwByZ5rL3utrRlMmapq85ZgrooYJ3EYimFeYSqkbV7MAWQSLyT 2Xxg== 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=RD0J2P9+VbsUOwoBQTLZXBkxUroecKNLgrXiRI3uA6U=; b=tFxcrFqrSsBVSTGCq7ZhdUqorKIFyOndpaCsCXvk2PXxaXNhwZIcGQVLk2k48AGkoP 89nJKQB6EGbIBtKoRHw6YlxI5v40NkHJecq2ThM5nnHdwr1QW9Epx0xKfL/YTnn7Y6Zm wdnkZX27LV18YdLgxn7AXbcpxnUYEWcb5mG3raZVddlPJ+eD2PR8coZq5uE41nUpe3CN fLUpqQz116qnIpfH76YuKsKrpkUNRmvEc01SV+p82CLdZAqrb1UUfzMSOShOWY4cunhb sRGf/UXRMFclxKAlmR5YOsZcmZpIiPlM1Rajnpa0SaeCn8ucimsY5zyuNyRDA+fLCRoI pFUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=uXGDyz4U; 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 a3-v6si35202239pgc.300.2018.06.05.12.44.21; Tue, 05 Jun 2018 12:44:37 -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=uXGDyz4U; 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 S1751999AbeFETnr (ORCPT + 99 others); Tue, 5 Jun 2018 15:43:47 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:44807 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbeFETnp (ORCPT ); Tue, 5 Jun 2018 15:43:45 -0400 Received: by mail-pl0-f66.google.com with SMTP id z9-v6so2157428plk.11 for ; Tue, 05 Jun 2018 12:43:45 -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=RD0J2P9+VbsUOwoBQTLZXBkxUroecKNLgrXiRI3uA6U=; b=uXGDyz4UxiCvwbSAAxJOIMp8f9OF9C6EvTStvSwpMX/yfqCyRbSkIi2TaqowcHHX8z WVAm8MExeoY5QP/kI+tHJ31xKWEu0VlFf/CXEDD1BOLiIYeURfR75kcJoyPiVTaNGnXT uuMqZZsCXIA4RXW/nAjTHnxcXpvyjTjpLcTc4= 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=RD0J2P9+VbsUOwoBQTLZXBkxUroecKNLgrXiRI3uA6U=; b=e0369wZlSpzjaIIHump3Z3z7QvZPPJvWT6JQoaknkPbNxg/ztYFjioA5FBgJBujI5o VzGDXMWaPtQDaPty7PJjeeRsZ4NcuCZowc7f1yjVhPgbMEcZwqI4Epzi595XVN4dlvYi 4jD51hjZKPgKUhVeprIjgWmeftzFH5V8a0HlWSxPVNoutJXODRgMOdPklXXcneRFts0m L5Zpt/471Ts0j83UP0d0Z4KSDb3/VZexv3lGFhrfBRE1WKpoGslMbDLCNyp0ylKTGzAG YZAGlkZNsk2yOJMbCIhcvPNoBBBKjL+g/34s37NNB5SBGWNR+KOTCmwusz8cqsaGELag mxxA== X-Gm-Message-State: APt69E3SgEXPpFUG7Rq/yDWiz6C+uKNFWLwi0JMbc0JXDf1Cr2Ecnn/5 MSACyu/ZWr60MGfSntyLIc47NQ== X-Received: by 2002:a17:902:3081:: with SMTP id v1-v6mr9150plb.266.1528227825395; Tue, 05 Jun 2018 12:43:45 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id k10-v6sm28287138pfj.29.2018.06.05.12.43.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 12:43:44 -0700 (PDT) Date: Tue, 5 Jun 2018 12:43:44 -0700 From: Joel Fernandes To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Joel Fernandes , Steve Muckle , Todd Kjos Subject: Re: [PATCH 2/2] sched/fair: util_est: add running_sum tracking Message-ID: <20180605194344.GB239272@joelaf.mtv.corp.google.com> References: <20180604160600.22052-1-patrick.bellasi@arm.com> <20180604160600.22052-3-patrick.bellasi@arm.com> <20180604174618.GA222053@joelaf.mtv.corp.google.com> <20180605152156.GD32302@e110439-lin> <20180605193317.GA239272@joelaf.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180605193317.GA239272@joelaf.mtv.corp.google.com> 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 12:33:17PM -0700, Joel Fernandes wrote: > On Tue, Jun 05, 2018 at 04:21:56PM +0100, Patrick Bellasi wrote: [..] > > To be more precise, at each ___update_load_avg we should really update > > running_avg by: > > > > u32 divider = LOAD_AVG_MAX - 1024 + sa->period_contrib; > > sa->running_avg = sa->running_sum / divider; > > > > but, this would imply tracking an additional signal in sched_avg and > > doing an additional division at ___update_load_avg() time. > > > > Morten suggested that, if we accept the rounding errors due to > > considering > > > > divider ~= LOAD_AVG_MAX > > > > thus discarding the (sa->period_contrib - 1024) correction, then we > > can completely skip the tracking of running_avg (thus saving space in > > sched_avg) and approximate it at dequeue time as per the code line, > > just to compute the new util_est sample to accumulate. > > > > Does that make sense now? > > The patch always made sense to me.. I was just pointing out the extra > division this patch adds. I agree since its done on dequeue-only, then its > probably Ok to do.. > One thing to note about this error is I remember not compensating for it would make the utilization reduce... which is kind of weird. But yeah if we can find a way compensate for the error and also keep the overhead low, that's super.. I know this is probably low in priority considering the other concerns Vincent brought up which are being discussed in the other thread,.. but just saying. :) - Joel