Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp781731imm; Fri, 1 Jun 2018 09:25:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJf7sQoHPhzqKmGoxL5Y+wwem4YuzhPb15geubB58brUUlUekIqLGvaQTAMkr3gx2ZOsGm/ X-Received: by 2002:a63:6741:: with SMTP id b62-v6mr9499913pgc.5.1527870302464; Fri, 01 Jun 2018 09:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527870302; cv=none; d=google.com; s=arc-20160816; b=TWaB8et0jDJZF5iMbV7KXnVK+XDUufRZuoxHCIfuGK0XCKgzNIV82NGKH8lQ73mY8y 1FiyV8EhqmY7sRMJMsMnLZnzc8Vb0hELicS6KoUzSPCi57WdFZglaM62Ce+3Taq7QjDK Ve0b/fymidTqNyZ+sPCxNRnerE6GFmy1YHL17vZFtsuN4zBSmydZBqQKYztWkJvb2Fbp hN/cIve2A5KoMv9BRB2r9e4Q4d7ZqoYcdzXZK1I7NqAmTh7euY+G6OtIyJoD8yey9+vA mcdVNEHUrhyJkOuseY8Srf+RrmTA3aakT6ar/6VDxWVK5WcxzA0QUdps/VEijGjoW2z+ Pdng== 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=rQla8BgrLDNZ0VEEp5P3KfLSwgAXOkERN0k5VGo9ons=; b=AcKOdQccMvQWwm60oH8ydeqGl/Wgx4bSqYiGY9TY2oXqN3pVTFexvmKHWmCxHi7pq3 Fj4xwILbmVUYPHN63mjqMfsoFHxpgFTgWwFMzwtgS7VJcaVGRuGH0qbYvZm7EUkxr+t4 tt+p+9gTuyKcxNH3A4ickY6y9+zrk1r/j+xMZ69QnuEU8iVzxNlN3PRChndX/3cerihW 3qR61unH79MVAeMWcZMZLoti9nJmogea9F+On6+xxsQBkL9suxC/fFqoirKPFLx215B/ k0qF4v+W0ApGXvRkeh6h97sR36VOdqWapqrFYbkEcPdSO01FsQfS05eq4sxBjbNq0WAW KCEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZfjDAixC; 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 b9-v6si1559423pfh.358.2018.06.01.09.24.47; Fri, 01 Jun 2018 09:25:02 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZfjDAixC; 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 S1752934AbeFAQYR (ORCPT + 99 others); Fri, 1 Jun 2018 12:24:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58898 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752064AbeFAQYP (ORCPT ); Fri, 1 Jun 2018 12:24:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rQla8BgrLDNZ0VEEp5P3KfLSwgAXOkERN0k5VGo9ons=; b=ZfjDAixCYj74cFc1Xxqjv6kky cQYHallZcR89GUW5Ii+WahT88u62S0rw3/juP69KpLajJ+aq1EVmepwShlfv7gomCmShM9zONT0Hj 2KxKOPwuvhA8vlVUSL3ocfyJnnCpFGWvlS5156ia4ZcEGtYcYuI1IgkEMXOX2oJiYbRFbhb83+04n TsZBI3ETugBAFvqe5f5sdz3UuUhH/+aBqmfHi6pfj/62XbbuZeWySFOkeE8p+UymJ5VWlHM6sPOA1 xkCLaHmwNAUDzSkXSnRZx+2sKaoAImWlNgCuog9xxH6oDZwV9y2F1B3sENBAphiSE13WmdTM6rW9M B0anrMSig==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOmqO-0006XM-F5; Fri, 01 Jun 2018 16:24:00 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E4E0E2029F870; Fri, 1 Jun 2018 18:23:57 +0200 (CEST) Date: Fri, 1 Jun 2018 18:23:57 +0200 From: Peter Zijlstra To: Juri Lelli Cc: Quentin Perret , Vincent Guittot , mingo@kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, viresh.kumar@linaro.org, valentin.schneider@arm.com Subject: Re: [PATCH v5 03/10] cpufreq/schedutil: add rt utilization tracking Message-ID: <20180601162357.GT12180@hirez.programming.kicks-ass.net> References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <1527253951-22709-4-git-send-email-vincent.guittot@linaro.org> <20180530164601.GC2174@e108498-lin.cambridge.arm.com> <20180531084607.GB17937@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531084607.GB17937@localhost.localdomain> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 31, 2018 at 10:46:07AM +0200, Juri Lelli wrote: > On 30/05/18 17:46, Quentin Perret wrote: > > So I understand why we want to got to max freq when a RT task is running, > > but I think there are use cases where we might want to be more conservative > > and use the util_avg of the RT rq instead. The first use case is > > battery-powered devices where going to max isn't really affordable from > > an energy standpoint. Android, for example, has been using a RT > > utilization signal to select OPPs for quite a while now, because going > > to max blindly is _very_ expensive. > > > > And the second use-case is thermal pressure. On some modern CPUs, going to > > max freq can lead to stringent thermal capping very quickly, at the > > point where your CPUs might not have enough capacity to serve your tasks > > properly. And that can ultimately hurt the very RT tasks you originally > > tried to run fast. In these systems, in the long term, you'd be better off > > not asking for more than what you really need ... > > Proposed the same at last LPC. Peter NAKed it (since RT is all about > meeting deadlines, and when using FIFO/RR we don't really know how fast > the CPU should go to meet them, so go to max is the only safe decision). > > > So what about having a sched_feature to select between going to max and > > using the RT util_avg ? Obviously the default should keep the current > > behaviour. > > Peter, would SCHED_FEAT make a difference? :) Hurmph... > Or Patrick's utilization capping applied to RT.. There might be something there, IIRC that tracks the max potential utilization for the running tasks. So at that point we can set a frequency to minimize idle time. It's not perfect, because while the clamping thing effectively sets a per-task bandwidth, the max filter is wrong. Also there's no CBS to enforce anything. With RT servers we could aggregate the group bandwidth and limit from that...