Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4756159imm; Tue, 7 Aug 2018 06:55:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdT83ce7g+NVStFtckP4i0ZLSLhfUmH5lVl4Ngm9T3ZXxrobi/DXG73S439I6xgduTZRXBQ X-Received: by 2002:a63:1d3:: with SMTP id 202-v6mr18614591pgb.136.1533650119318; Tue, 07 Aug 2018 06:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533650119; cv=none; d=google.com; s=arc-20160816; b=sTsRUEPLMBZ9ELqBB1LH+aLaSTiiCy5UDyxrc8FlKID7QQ9GCl+OkUEoUEb8mv5Kfc diDv9Kr1ySjUqtaBQvmU78o6r4ijxvYiYwPMYF+a6MjqocSRAkTbO7urYGpP/OENC1cG ZRadVA6HjL9zinLFG3EOtSXPUnA+NIf25uUfasNFZrwnWTgPaL3EGPHwLijZLqGqyquA dWNeRrRtq7l8I/yd+fCpu/5C1/uyLGccRXxvOqf8hS6VgkjqRWAEzwvRFBayf6mN/HIA rednYJlnDXYMR+T11AceRX/f+YwG3KROK8g/99atNVb6eIRL8xqpn0SWt2KzkGGQBKGN EkYg== 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=6TQNnLKFXnm4y2MO6rmbimO0lHGNUgNxrofIck03MFU=; b=JcF6LXNXzSdy8/pyM6XOGFIBK+VCxlja3EBDzXPoPbMF51pikcKdBEhMbvXisl5arv +OMn6DqSlALUCoUpLLaJhg1JLn0TlhPD2yx7qWUy7rWlC29f/Nn4agtuAQKnfjwWqXqE Zw7OlrGs5xnumpfiRlXvnPrmVJq5t5Xco5KigVuU9XuJ3cT5nnsGP27aolmo/6zzMuFV zm9ZPYAWJnBYwW2I1E2BH/pNZ6fxuCN4yI8kcYBMzUvsnZfCupeNd16pOeQGV6knemQU Gb6/kaR6Q7A2EoLervj+zaqux0HfG2/poZ4JKFONcZ9Ii97vW5Q1hhs1Ub0D7d/G2IFb jIfA== 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 n34-v6si1490369pgm.28.2018.08.07.06.55.04; Tue, 07 Aug 2018 06:55:19 -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 S2389318AbeHGQIi (ORCPT + 99 others); Tue, 7 Aug 2018 12:08:38 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54718 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727605AbeHGQIi (ORCPT ); Tue, 7 Aug 2018 12:08:38 -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 ACCE97A9; Tue, 7 Aug 2018 06:54:11 -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 DE5863F5B3; Tue, 7 Aug 2018 06:54:08 -0700 (PDT) Date: Tue, 7 Aug 2018 14:54:04 +0100 From: Quentin Perret To: Patrick Bellasi 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 , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan Subject: Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks Message-ID: <20180807135403.s7jktvxmhycujeht@queper01-lin> References: <20180806163946.28380-1-patrick.bellasi@arm.com> <20180806163946.28380-7-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180806163946.28380-7-patrick.bellasi@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Patrick, On Monday 06 Aug 2018 at 17:39:38 (+0100), Patrick Bellasi wrote: > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c > index a7affc729c25..bb25ef66c2d3 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -200,6 +200,7 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy, > static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu) > { > struct rq *rq = cpu_rq(sg_cpu->cpu); > + unsigned long util_cfs, util_rt; > unsigned long util, irq, max; > > sg_cpu->max = max = arch_scale_cpu_capacity(NULL, sg_cpu->cpu); IIUC, not far below this you should still have something like: if (rt_rq_is_runnable(&rq->rt)) return max; So you won't reach the actual clamping code at the end of the function when a RT task is runnable no? Also, I always had the feeling that the default for RT should be util_min == 1024, and then users could decide to lower the bar if they want to. For the specific case of RT, that feels more natural than applying a max util clamp IMO. What do you think ? Thanks, Quentin