Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7650533imu; Tue, 22 Jan 2019 09:16:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN4s0RYKjUl1BBuxJHp6yFocipMhDv6GKy+947AiZk8SkHqa+TEkgAy/6pXvg3eycRaLSXzj X-Received: by 2002:a62:546:: with SMTP id 67mr33524589pff.99.1548177385911; Tue, 22 Jan 2019 09:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548177385; cv=none; d=google.com; s=arc-20160816; b=K6UOMn9ZwnjLWIFUv8Ese8i6+/DT58e86bGs/zU9kRQk54T861xVA1lCMhxAKMYejk OHRECIicyGyOMl/4jPmpTiZE8Fh52GmaI1SEdbdmkD+y2mtoC1Ax0heelwTTgojtDhWr 6PjnTf/j5isrxNwimnY0pXGDzakrK6xxAHQRUru5IrG81d3dvHWaUD+HOxMAAE8iz/jO AfmS2u3OMTjWumK9z2TUPrdzoC4GVaCzh5bXQAxldV+Unssk17iWdPYC/CW1dY1JkOI2 7nK6DMDmienqYC3GoBADgCn++zc2CyyGQa2ZdQHFsP7NT9UMcmWumm4CW/44aYll/mF+ E8vQ== 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; bh=5mX3uOPs0Ea+SwmTP+PBPfXEY8NCxY+CmKxc5I2qaOQ=; b=kRyyKKHKziE+7XAxueFOi+Np5kIe1U0ZdeqCeQcxvRSI9TX02QfyEgFku1qbEBBto5 n5bRb2rbu2SsgFsSYTG5Fo0y4VSI2e51wvfTzY/sY2LDVaA2ioE7/0QZ3AbckiOT6hHW +Dj6C7ZpFDbA6ofDyikuNLjl42sd0MCl0H8bYZmQFF+kmwG1rV6ILPLowXaWrCER26qM w1h2ddp1U1/sCPv3dOmeeHQMBppMw5td6QDQz0PEep6X3COKYWh8O1cvXlcjMC/GDC+c zyN8yoYh0NTHqDCFo1Hak81q0ihhQo9URLgRNEZaB1+joQeBLvnAQcwLtSd8dFpZVbMf KZVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=MSi3ddBE; 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 e7si11680308pgi.263.2019.01.22.09.16.10; Tue, 22 Jan 2019 09:16:25 -0800 (PST) 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=merlin.20170209 header.b=MSi3ddBE; 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 S1729586AbfAVRN1 (ORCPT + 99 others); Tue, 22 Jan 2019 12:13:27 -0500 Received: from merlin.infradead.org ([205.233.59.134]:34346 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729316AbfAVRN1 (ORCPT ); Tue, 22 Jan 2019 12:13:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=5mX3uOPs0Ea+SwmTP+PBPfXEY8NCxY+CmKxc5I2qaOQ=; b=MSi3ddBEszx/AT5tjeydVGqNX tb5FTrpkTlVofYEyYaDyR8nxzQ849MjwLx3ujFBjgbgFuO/ld7LbJLFQmXAP+Vwg3XbUM06mIUVNL zwj+qNOmkXFl8WhR2N/Cgugkylhdt9rRkiBRskFn0fc3Jv9QV4o12Y/oTT0ypoHbSnkKlWFKU2DyW kOd0oiiN5pEzvwD1ZLMIR6W5efudpaKChjPn16V14lc3AHyfIWdwZpQqGng/xhTtqSItpW+1WibvY V7ukLeMloMwGBz3s7h1QTzDv0lpZb9oVG/zJ3uxjWAGC1kwR1Fah/ECkmVwIL+u6Ce4SMdLC0lYzR 9Swbt2apg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1glzbw-0005Al-LX; Tue, 22 Jan 2019 17:13:17 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 213042042CFC2; Tue, 22 Jan 2019 18:13:14 +0100 (CET) Date: Tue, 22 Jan 2019 18:13:14 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-api@vger.kernel.org, Ingo Molnar , Tejun Heo , "Rafael J . Wysocki" , Vincent Guittot , Viresh Kumar , Paul Turner , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan Subject: Re: [PATCH v6 08/16] sched/cpufreq: uclamp: Add utilization clamping for FAIR tasks Message-ID: <20190122171314.GS27931@hirez.programming.kicks-ass.net> References: <20190115101513.2822-1-patrick.bellasi@arm.com> <20190115101513.2822-9-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190115101513.2822-9-patrick.bellasi@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 10:15:05AM +0000, Patrick Bellasi wrote: > @@ -342,11 +350,24 @@ static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, u64 time, > return; > sg_cpu->iowait_boost_pending = true; > > + /* > + * Boost FAIR tasks only up to the CPU clamped utilization. > + * > + * Since DL tasks have a much more advanced bandwidth control, it's > + * safe to assume that IO boost does not apply to those tasks. I'm not buying that argument. IO-boost isn't related to b/w management. IO-boot is more about compensating for hidden dependencies, and those don't get less hidden for using a different scheduling class. Now, arguably DL should not be doing IO in the first place, but that's a whole different discussion. > + * Instead, since RT tasks are not utilization clamped, we don't want > + * to apply clamping on IO boost while there is blocked RT > + * utilization. > + */ > + max_boost = sg_cpu->iowait_boost_max; > + if (!cpu_util_rt(cpu_rq(sg_cpu->cpu))) > + max_boost = uclamp_util(cpu_rq(sg_cpu->cpu), max_boost); > + > /* Double the boost at each request */ > if (sg_cpu->iowait_boost) { > sg_cpu->iowait_boost <<= 1; > - if (sg_cpu->iowait_boost > sg_cpu->iowait_boost_max) > - sg_cpu->iowait_boost = sg_cpu->iowait_boost_max; > + if (sg_cpu->iowait_boost > max_boost) > + sg_cpu->iowait_boost = max_boost; > return; > } Hurmph... so I'm not sold on this bit.