Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2577735imm; Thu, 16 Aug 2018 11:48:59 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyyn4b+lp/SwnYGkneVqOiChtunobWwWFBybOTGMPD9dTdCsYMq5u1H8Q43QBOO8s36O8x2 X-Received: by 2002:a62:45d2:: with SMTP id n79-v6mr33390849pfi.137.1534445339790; Thu, 16 Aug 2018 11:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534445339; cv=none; d=google.com; s=arc-20160816; b=FJpDeCsATLkoGvmmOlhksGii97DXhfvU2wFmZ6pbGHKPzpYv+q9eJEVWNtFSR//70B uRlBNLjpgZ5MZIb27Rmn5eWOHsnXQPsypYdyU+ZUTSrJJRw0IPdnYNYtbWZkvOWidOUv R0sGbTd9BhWK7XZ8hq1qOJ0rCObU4FY+SlEuYjCqpoxX6vqjOqSh0za7znnhPmYDUGnL mrDXxCJrevj5msSNzPsR9UM0xpSAw6A+TDm331cZAOAQiU0R5jfolV8T9DP8lWibjP/W /PvZ760QOS+51U6UMr1VWC+cbgXY2QHeZLknSxvJxx/UEwAdfwEYqMypTDkVGfd9dXW4 ACkg== 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=GoaZv4/vuvEvppwqBk3IERxjOGoFeEKKt1NVDtxMH/k=; b=cbpANwsG4C5LewIjjH3NwQxoe+5Fv9yYJSzB5DLho88Jthc6JhvpU7cRtqlRL5zIXp jyiwJsajZaJAVsrG+GlajIPf5BdWXYCMiLYAL3D4atmcnnN0daMeFFHLV37b7f0B8TSE 7syBJt1le0soArkcRNymGiLiDcOxn1cBe8AdmKypzXHP7k1W7pHKgTEWUaxwwtmObPRy 2vnoPltbFW85vDIHszLcihPo3v7ZHYuZ8CWODbduTbsOCVKOB3H3+AfLxQbhhP9qQfSk rJhv3CUcbYMuex2ah+y2eCSwq/5lKwoaPUIsHmJKqkYAyemJf1lg6mzWQCOLs1iISFpk rXYw== 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 b14-v6si40167pgd.136.2018.08.16.11.48.43; Thu, 16 Aug 2018 11:48:59 -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 S1730498AbeHPU0z (ORCPT + 99 others); Thu, 16 Aug 2018 16:26:55 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39382 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728956AbeHPU0z (ORCPT ); Thu, 16 Aug 2018 16:26:55 -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 1B7917A9; Thu, 16 Aug 2018 10:27:08 -0700 (PDT) Received: from e110439-lin (e110439-lin.Emea.Arm.com [10.4.12.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6E1E23F5B3; Thu, 16 Aug 2018 10:27:05 -0700 (PDT) Date: Thu, 16 Aug 2018 18:27:02 +0100 From: Patrick Bellasi To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Tejun Heo , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan Subject: Re: [PATCH v3 07/14] sched/core: uclamp: enforce last task UCLAMP_MAX Message-ID: <20180816172702.GH2960@e110439-lin> References: <20180806163946.28380-1-patrick.bellasi@arm.com> <20180806163946.28380-8-patrick.bellasi@arm.com> <2366fe11-db1f-4f39-df03-960535611319@arm.com> <20180816164745.GF2960@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-Aug 19:10, Dietmar Eggemann wrote: > On 08/16/2018 06:47 PM, Patrick Bellasi wrote: > >On 16-Aug 17:43, Dietmar Eggemann wrote: > >>On 08/06/2018 06:39 PM, Patrick Bellasi wrote: > >>>When a util_max clamped task sleeps, its clamp constraints are removed > >>>from the CPU. However, the blocked utilization on that CPU can still be > >>>higher than the max clamp value enforced while that task was running. > >>>This max clamp removal when a CPU is going to be idle could thus allow > >>>unwanted CPU frequency increases, right while the task is not running. > >> > >>So 'rq->uclamp.flags == UCLAMP_FLAG_IDLE' means CPU is IDLE because > >>non-clamped tasks are tracked as well ((group_id = 0)). > > > >Right, but... with (group_id = 0) you mean that "non-clamped tasks are > >tracked" in the first clamp group? > > Yes. I was asking myself what will happen if there are only non-clamped > tasks runnable ... Non clamped tasks is kind-of ambiguous, since you can have: a) tasks with util_max = UCLAMP_NOT_VALID (the default for all tasks) b) tasks with util_max = SCHED_CAPACITY_SCALE as a task specific clamp value They are both technically not clamped but, for case b there should not be issue, since we will track SCHED_CAPACITY_SCALE as idle hold value. For case a instead is a bit different, especially when they mix with tasks with a valid task specific clamp value, as I've just commented in this posting: Message-ID: <20180816172016.GG2960@e110439-lin> > > > > >>Maybe this is worth mentioning here? > > > >Maybe I can explicitely say that we detect that there are not RUNNABLE > >tasks because all the clamp groups are in UCLAMP_NOT_VALID status. > > Yes, would have helped me the grasp this earlier ... Right, I'm going to add a bit of text on that. Cheers Patrick -- #include Patrick Bellasi