Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5570536imm; Wed, 12 Sep 2018 07:57:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZvA0zguGE32mJEdXXqm3igTeg16htq/NL+yFKQbsx3JVggUD682i2fikoOHULWqet/K9O/ X-Received: by 2002:a62:e813:: with SMTP id c19-v6mr2867509pfi.124.1536764226298; Wed, 12 Sep 2018 07:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536764226; cv=none; d=google.com; s=arc-20160816; b=PeJ4Uw8xyFMwKUbreDGaG/xwiunPSwygZjzS1Oz/KKeEz8uq+FXGIznKkyodllcFRa JSZXp709PPsODMhvy/Chv1NcEB0KViNOS2DgusJXtSMthw6eBiiKPfLPsVQrSljwDKpi 6WI5dQbXXVEOxQZcSixtWHeYLLMxhzyLa2RA5QhTb+uEWLtOr4ZgaWUT4mi8vTdm/MaQ U6ylJWFVC3Hs4hRW43T7n0DQcJnC2kSSqaAZdqyesEbuZk2WCKFXjkjBeZ0K8+szLqAH CDg+Evw3H8Qwngcm3d55QwW1PUMdXs//2nKqv1f7TrCCHahP7isbz6QtyaFn2vySpqR+ 1aOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+nLwE+05HPlow49c8NsY3uomOHVHwOHp6XcBes9vnO8=; b=oyHjC15n3kocVPQuV/bKqnmR2Z7Y0Wbu14fu08orMR6rn6IusZLC6mzIX9PS+w0wUn J0JYE/O4ClM6vc1hIs4/vSLK87vE0ynLh55yDwap+2gXQaCzjdg5Ct3IaRlhuff9+kq2 cW2e+awKq8rmGTxCA6ZhD8T2gEtA5/6f4ylzXjQGAJF6oq0FFwE83xPELb/AvThgk2Vb v5I9MBWQSlcXJdL2Xj+kUxvaYjgr3bZXWlcPfVR57+dA+/Gj721Bs22ri3wYJxXUlpcQ xBA8YIqwA6oPlxZ0HZXCG/hJGOA0h/2UpPdg+giUp0l8uOAaFOdbdpLim2LqsEyKacvf wgsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RSSwmyA4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d32-v6si1140759pla.93.2018.09.12.07.56.49; Wed, 12 Sep 2018 07:57:06 -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=@linaro.org header.s=google header.b=RSSwmyA4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728198AbeILUBg (ORCPT + 99 others); Wed, 12 Sep 2018 16:01:36 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:51409 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbeILUBf (ORCPT ); Wed, 12 Sep 2018 16:01:35 -0400 Received: by mail-it0-f65.google.com with SMTP id e14-v6so3435323itf.1 for ; Wed, 12 Sep 2018 07:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+nLwE+05HPlow49c8NsY3uomOHVHwOHp6XcBes9vnO8=; b=RSSwmyA4TSzzZmmBwDdVqcv19sTxX7dX1hYJD7ydL9eZE1oMKgaIoymamsvOGkxfaS Ue5Qlkue8E7cAHcltDt/K31dzYD6yANwcman1EWjUDu71jT8amFIdqh2LuNBuL4Rgv37 2w/cUXDBTLC11NAqXsRd/9ZjNDB6yd7Dp66Dc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+nLwE+05HPlow49c8NsY3uomOHVHwOHp6XcBes9vnO8=; b=ajJuQzeETKmkRsTKkzk6gmdLXEcvNeXyyBbDLY3KjLHure48x9HV3mXFJJitRtrUzj nv3HnaTHsRZ/+i75mprlOEyVMJ3SCj9JYjc7oKnSVpr88nlbc1qg3vShTF2hnKiBuEyc TZ9l/WNg1O3pz/qU6+Dd6JRRUPntlzrTj054FNfrnh4o048K/XQ6eHC5g/4PBUIdJ+hc oy3DrWwcGt39xZtn2RTQGXmVcfk0Uiy+9br/yodhLeyjpO4xmMRNkMChfVh8Sg1IHiWb jjv4Jl2P47SMtygtvjL/5r8HQ79F4/2x948v+xkhigyxyeDntsqKhRSIL6Jrezch88hg TUWw== X-Gm-Message-State: APzg51AVnUQyIGl5SPgTkcYFzy6elicyMwXDzMUpkv4d05A4NHL1/B0M UC61OzEk6OPwTGQKUVIiVsIe/5L/t9mo2PIs1zM+Bg== X-Received: by 2002:a24:d104:: with SMTP id w4-v6mr2331522itg.29.1536764202143; Wed, 12 Sep 2018 07:56:42 -0700 (PDT) MIME-Version: 1.0 References: <20180912091309.7551-1-quentin.perret@arm.com> <20180912091309.7551-3-quentin.perret@arm.com> In-Reply-To: <20180912091309.7551-3-quentin.perret@arm.com> From: Vincent Guittot Date: Wed, 12 Sep 2018 16:56:31 +0200 Message-ID: Subject: Re: [PATCH v7 02/14] sched/cpufreq: Prepare schedutil for Energy Aware Scheduling To: Quentin Perret Cc: Peter Zijlstra , "Rafael J. Wysocki" , linux-kernel , "open list:THERMAL" , "gregkh@linuxfoundation.org" , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , Thara Gopinath , viresh kumar , Todd Kjos , Joel Fernandes , "Cc: Steve Muckle" , adharmap@codeaurora.org, Saravana Kannan , pkondeti@codeaurora.org, Juri Lelli , Eduardo Valentin , Srinivas Pandruvada , currojerez@riseup.net, Javi Merino Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quentin, On Wed, 12 Sep 2018 at 11:13, Quentin Perret wrote: > > Schedutil requests frequency by aggregating utilization signals from > the scheduler (CFS, RT, DL, IRQ) and applying and 25% margin on top of quite a minor thing but s/and 25%/a 25%/ > them. Since Energy Aware Scheduling (EAS) needs to be able to predict > the frequency requests, it needs to forecast the decisions made by the > governor. > > In order to prepare the introduction of EAS, introduce > schedutil_freq_util() to centralize the aforementioned signal > aggregation and make it available to both schedutil and EAS. Since > frequency selection and energy estimation still need to deal with RT and > DL signals slightly differently, schedutil_freq_util() is called with a > different 'type' parameter in those two contexts, and returns an > aggregated utilization signal accordingly. While at it, introduce the > map_util_freq() function which is designed to make schedutil's 25% > margin usable easily for both sugov and EAS. > > As EAS will be able to predict schedutil's frequency requests more > accurately than any other governor by design, it'd be sensible to make > sure EAS cannot be used without schedutil. This will be done later, once > EAS has actually been introduced. > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Suggested-by: Peter Zijlstra > Signed-off-by: Quentin Perret