Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2259758imm; Thu, 2 Aug 2018 08:40:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfKldTtmn9gz/zGW40AA0X2v5OabKHrTMRsGD6mPdNqlzbrStDNggE1UveQdiWnpcv3tPQ7 X-Received: by 2002:a62:828a:: with SMTP id w132-v6mr3569422pfd.121.1533224430886; Thu, 02 Aug 2018 08:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533224430; cv=none; d=google.com; s=arc-20160816; b=T2JHl6fHn9CcyTriz/ja2r7ET26bHivAifLPCB0t2JKAJeORNNju1dFMQguXgFAJj0 S2aOQWq3O54sOEHoYtmWQ3QAcHdF02Gx5AEtwK5rLN+EwOxr5tuwG37x5YUEdZxgu9+Q Rrk/H05kIWcGAdZDx8qa7Nm1MzHAsZeht1V9WeqRQIBpyb6kSrcCI8QzNc+afOV34y0/ 7C/DT2MvW08s106yU3pJeUwJRcil6+kcSBpmyaiXVl4JUEzJzppELWcd9O4KyTWTzUpr xL2BPWIl4sGhXBKIzgAJw7NPz61U9TVEeCcXIrKHIn2jaoULUIq5z9mUXU42g151DG3n Y1HA== 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:arc-authentication-results; bh=e0rvGPDJIGH9+j/8r167sABkIyfWK/4mTVl/J2d2kLo=; b=RX+HvuUrnlkthU7HCMCyva9iYw8jZXQ7rIhUTwJTtusMgUWda4kjXiNNg0JJDzHJ+U K8yu3zefWc+xNTU9SLKrkzOrGCpmlNbYvgr2XJZTT/2wCoolH/XhQWU6qxdWefVTu9qQ cJ7fR/mlnnDUv5PEcIsW1RxZIh1axhzq2eRb+BWu0OGWf4epnJKvh/k7FocCCKgNZwtZ Mo6v9RgHb1uVZQZQxnLKJhjzzaoZ3+dxsb4a+ChLCUYpEUsAAdnWDABODB5xoHqU14s2 p4HtsVYxJ0lXB7FFSPzarGygApaDhX9/0IkwewgPriZG5uBZPZh2oFhIXVDZcAaxsEEh rTig== ARC-Authentication-Results: i=1; mx.google.com; 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 ba6-v6si1576082plb.364.2018.08.02.08.40.15; Thu, 02 Aug 2018 08:40:30 -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; 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 S2387671AbeHBRbI (ORCPT + 99 others); Thu, 2 Aug 2018 13:31:08 -0400 Received: from foss.arm.com ([217.140.101.70]:59624 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387577AbeHBRbI (ORCPT ); Thu, 2 Aug 2018 13:31:08 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BA29C80D; Thu, 2 Aug 2018 08:39:25 -0700 (PDT) Received: from queper01-lin (queper01-lin.emea.arm.com [10.4.13.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5B8743F5B3; Thu, 2 Aug 2018 08:39:21 -0700 (PDT) Date: Thu, 2 Aug 2018 16:39:19 +0100 From: Quentin Perret To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Saravana Kannan , "Rafael J. Wysocki" , Linux Kernel Mailing List , Linux PM , Greg Kroah-Hartman , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , Vincent Guittot , Thara Gopinath , Viresh Kumar , Todd Kjos , Joel Fernandes , Steve Muckle , adharmap@quicinc.com, skannan@quicinc.com, Pavan Kondeti , Juri Lelli , Eduardo Valentin , Srinivas Pandruvada , currojerez@riseup.net, Javi Merino , linux-pm-owner@vger.kernel.org Subject: Re: [PATCH v5 10/14] sched/cpufreq: Refactor the utilization aggregation method Message-ID: <20180802153917.cpvls5hxkvevjh6s@queper01-lin> References: <20180724122521.22109-1-quentin.perret@arm.com> <20180724122521.22109-11-quentin.perret@arm.com> <331552975e858911db66bc78c2c8e720@codeaurora.org> <20180731075950.tfvxef6yuja3ad2k@queper01-lin> <75f415911ccdd02d6fd217ca1c7d8902@codeaurora.org> <20180801082353.egym4tsbr7ppql27@queper01-lin> <20180801092325.g2upcivcvdo62hub@queper01-ThinkPad-T460s> <20180802130440.GW2476@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180802130440.GW2476@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 02 Aug 2018 at 15:04:40 (+0200), Peter Zijlstra wrote: > On Wed, Aug 01, 2018 at 10:23:27AM +0100, Quentin Perret wrote: > > On Wednesday 01 Aug 2018 at 10:35:32 (+0200), Rafael J. Wysocki wrote: > > > On Wed, Aug 1, 2018 at 10:23 AM, Quentin Perret wrote: > > > > On Wednesday 01 Aug 2018 at 09:32:49 (+0200), Rafael J. Wysocki wrote: > > > >> On Tue, Jul 31, 2018 at 9:31 PM, wrote: > > > >> >> On Monday 30 Jul 2018 at 12:35:27 (-0700), skannan@codeaurora.org wrote: > > > >> >>> If it's going to be a different aggregation from what's done for > > > >> >>> frequency > > > >> >>> guidance, I don't see the point of having this inside schedutil. Why not > > > >> >>> keep it inside the scheduler files? > > > >> >> > > > >> >> This code basically results from a discussion we had with Peter on v4. > > > >> >> Keeping everything centralized can make sense from a maintenance > > > >> >> perspective, I think. That makes it easy to see the impact of any change > > > >> >> to utilization signals for both EAS and schedutil. > > > >> > > > > >> > In that case, I'd argue it makes more sense to keep the code centralized in > > > >> > the scheduler. The scheduler can let schedutil know about the utilization > > > >> > after it aggregates them. There's no need for a cpufreq governor to know > > > >> > that there are scheduling classes or how many there are. And the scheduler > > > >> > can then choose to aggregate one way for task packing and another way for > > > >> > frequency guidance. > > > >> > > > >> Also the aggregate utilization may be used by cpuidle governors in > > > >> principle to decide how deep they can go with idle state selection. > > > > > > > > The only issue I see with this right now is that some of the things done > > > > in this function are policy decisions which really belong to the governor, > > > > I think. > > > > > > Well, the scheduler makes policy decisions too, in quite a few places. :-) > > > > That is true ... ;-) But not so much about frequency selection yet I guess > > Well, sugov is part of the scheduler :-) It being so allows for the > co-ordinated decision making required for EAS. > > > > The really important consideration here is whether or not there may be > > > multiple governors making different policy decisions in that respect. > > > If not, then where exactly the single policy decision is made doesn't > > > particularly matter IMO. > > > > I think some users of the aggregated utilization signal do want to make > > slightly different decisions (I'm thinking about the RT-go-to-max thing > > again which makes perfect sense in sugov, but could possibly hurt EAS). > > > > So the "hard" part of this work is to figure out what really is a > > governor-specific policy decision, and what is common between all users. > > I put "hard" between quotes because I only see the case of RT as truly > > sugov-specific for now. > > > > If we also want a special case for DL, Peter's enum should work OK, and > > enable to add more special cases for new users (cpuidle ?) if needed. > > But maybe that is something for later ? > > Right, I don't mind moving the function. What I do oppose is having two > very similar functions in different translation units -- because then > they _will_ diverge and result in 'funny' things. Sounds good :-) Would kernel/sched/pelt.c be the right place then ? It's cross-class and kinda pelt-related I guess Thanks, Quentin