Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751274AbdH2GlU (ORCPT ); Tue, 29 Aug 2017 02:41:20 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57018 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdH2GlS (ORCPT ); Tue, 29 Aug 2017 02:41:18 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 07D1E60731 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=pkondeti@codeaurora.org MIME-Version: 1.0 In-Reply-To: <20170825102008.4626-2-patrick.bellasi@arm.com> References: <20170825102008.4626-1-patrick.bellasi@arm.com> <20170825102008.4626-2-patrick.bellasi@arm.com> From: Pavan Kondeti Date: Tue, 29 Aug 2017 12:11:15 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 1/3] sched/fair: add util_est on top of PELT To: Patrick Bellasi Cc: LKML , linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Paul Turner , Vincent Guittot , John Stultz , Morten Rasmussen , Dietmar Eggemann , Juri Lelli , Tim Murray , Todd Kjos , Andres Oportus , Joel Fernandes , Viresh Kumar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1629 Lines: 49 On Fri, Aug 25, 2017 at 3:50 PM, Patrick Bellasi wrote: > The util_avg signal computed by PELT is too variable for some use-cases. > For example, a big task waking up after a long sleep period will have its > utilization almost completely decayed. This introduces some latency before > schedutil will be able to pick the best frequency to run a task. > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index c28b182c9833..8d7bc55f68d5 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > > /* task_struct member predeclarations (sorted alphabetically): */ > struct audit_context; > @@ -277,6 +278,16 @@ struct load_weight { > u32 inv_weight; > }; > > +/** > + * Utilizaton's Exponential Weighted Moving Average (EWMA) > + * > + * Support functions to track an EWMA for the utilization of SEs and RQs. New > + * samples will be added to the moving average each time a task completes an > + * activation. Thus the weight is chosen so that the EWMA wil be relatively > + * insensitive to transient changes to the task's workload. > + */ > +DECLARE_EWMA(util, 0, 4); > + > /* Should the factor be 1 instead of 0? i.e 25% contribution from the recent sample. Thanks, Pavan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project