Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2203613imm; Thu, 9 Aug 2018 08:57:46 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzWv0Vkk734gpGlJS+wVrOBnzvRf+CjAQIKhvbjDXgrg1oWbjNcXKif1wEutUxAnmmJOVOp X-Received: by 2002:a63:f804:: with SMTP id n4-v6mr2764251pgh.106.1533830266804; Thu, 09 Aug 2018 08:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533830266; cv=none; d=google.com; s=arc-20160816; b=mz9N81OLvOMgh8DyK0vg7aLkhCn4Pzi3s913OipV/LB907QcBBJYA7El5qhfwYv6KX uCUTOQnWBvjkOITlOAJPZANML5dCW7B4Y2mYoFUzg5W0P4BISlHnvYINCFuAP0C12uTK tedZTQzmemn7+35yR5rKr33xBBYA4f2758XJQCuR9blJ/Lhk6OYW/LEvwwpWsFJIGYlJ d+63c3Q3tkHviZSj2OtmbFC3OiAhB8Fsb0PLqkb0E3k0SGIgN065Q8d0N+/gbKgJ3eOK zmwzzlYMqVLNdEO6NBnziCi8U8KAtTeMiEhbSqLezQhP1dnC5xqrDtu/uJIL29FYurT2 aY6A== 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=oyjFAK2XOsnpWsaDPtVVN639bTFUxa3Jgh+CsDdVTyU=; b=Jn6bEnU/hWMabpEWKBEpUeslaP67JXtx9AvI2S7U4dNN+GaXs43/cqo5K/+JZ5yWhQ EUEhY7+5wHP0cxj+K64SC0aAfERi+yGYr4MeLEK1MaRK0IGrwknqK57yK34pKa9u6yg3 o9vHZLr4I/JVhvoHAbEF8GtMNUSq1+rqoYulajNn6X1ifT3rPs5cWRGQoSJQYb8FjY0X FFb8vvNNU+NWiSC4zOv1ha7eTWcM5uwzng+iSlUHnYZxF2piKcsg3NDN26ng4B10VY/U z9/kMjD8E8XlOyjgg4/UpoRK+y60Mv3y7WbCMaokTDLNcWohU/b9mhIO+/ZnW/d/GSbn CzqA== 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 bb1-v6si5875933plb.480.2018.08.09.08.57.32; Thu, 09 Aug 2018 08:57:46 -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 S1732478AbeHISVe (ORCPT + 99 others); Thu, 9 Aug 2018 14:21:34 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55932 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732432AbeHISVc (ORCPT ); Thu, 9 Aug 2018 14:21:32 -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 96F5D7A9; Thu, 9 Aug 2018 08:56:01 -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 C95BF3F5B3; Thu, 9 Aug 2018 08:55:58 -0700 (PDT) Date: Thu, 9 Aug 2018 16:55:53 +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: <20180809155551.bp46sixk4u3ilcnh@queper01-lin> References: <20180806163946.28380-1-patrick.bellasi@arm.com> <20180806163946.28380-7-patrick.bellasi@arm.com> <20180807135403.s7jktvxmhycujeht@queper01-lin> <20180809154156.gdsx2vacjmp6p6dp@darkstar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180809154156.gdsx2vacjmp6p6dp@darkstar> 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 Thursday 09 Aug 2018 at 16:41:56 (+0100), Patrick Bellasi wrote: > > IIUC, not far below this you should still have something like: > > > > if (rt_rq_is_runnable(&rq->rt)) > > return max; > > Do you mean that when RT tasks are RUNNABLE we still want to got to > MAX? Not sure to understand... since this patch is actually to clamp > the RT class... Argh, reading my message again it wasn't very clear indeed. Sorry about that ... What I'm try to say is that your patch does _not_ remove the snippet of code above from sugov_get_util(). So I think that when a RT task is runnable, you will not reach the end of the function where the clamping is done. And this is not what you want AFAICT. Does that make any sense ? > > > So you won't reach the actual clamping code at the end of the function > > when a RT task is runnable no? > > ... mmm... no... this patch is to clamp RT tasks... Am I missing > something? > > > 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. > > Mmm... good point! This would keep the policy unaltered for RT tasks. > > I want to keep sched class specific code in uclamp at minimum but > likely this should be achievable by just properly initializing the > task-specific util_min for RT tasks, if the original task has > UCLAM_NOT_VALID. +1, it'd be nice to keep the cross-class mess to a minimum IMO. But hopefully this RT thing isn't too ugly to implement ... > > > For the specific case of RT, that feels more natural than > > applying a max util clamp IMO. What do you think ? > > I'll look better into this for the next posting! Sounds good :-) Thanks, Quentin