Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2996349imm; Thu, 17 May 2018 01:20:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqEufgoZVuXX7b4EuLnKTYTcQJZlh53pG47C/GcTuIHxwSEB8Sjk0ZUO2lQMSOhDcNICifc X-Received: by 2002:a17:902:7d87:: with SMTP id a7-v6mr4441500plm.264.1526545235296; Thu, 17 May 2018 01:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526545235; cv=none; d=google.com; s=arc-20160816; b=O0gwy4IqaoaXzhq05Mag6+GQh+QA7ssg1xho7WvdPr9wi69wVakIzTmGNBD298rfwc aoVIGQSZudCfAbeIcZzk9WsCTFLOVk4rolW6Sn0q80LorI7cJ0Y9EuRqIqYnpxHHZuBe ttyD6zLvsP77J5CTCphMezcOV/grvx2yuLtRcbw4MPNtv/DMPBMFhgiSA12RbRpZxCWr iWADm5P0ogfUGtkjLWSzquhdm/AZsoYkdrNla+kxG8VEc+sFMRzymSoX1bY5WtpCC7aG pTWAYTrjEsF0Le/gUme7P1H/JyfZJS3UJC3IKYeLLSSy8C64hxrHN2SdLQZBm2HmFJG+ 5iqQ== 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=EpWDYULr1hY1lKJcbIzBFjEZyJKTMLy8swmux/dReWs=; b=rIVXsBR5WZ323yCP9ahaEZ0O7ZugMtQPlmPkeVbqwN4UoCJ1NmO6ZhFTvPUhfCmb1j bopdcYrRhOeq9UtIe9YH0NmVeN9q/+HXlFq4J/T/IJM7wV0wqXnKksW3LhkGwKBb2Ikt 8urhX5rlytkT7OS410PpaADvKYEFEAdtz6DST7mhGwfdakNAmtZDWMuenuAm/Bkf3BC4 VyfFvnqsFfqCBEqQ9jj4te4/VRLz4j0SHTiNPds+iXLcUJZo3kD2KrWIjsEwqUL+V9nd V1yZUYmPqz4yHPQPpFu6CzO5qqb6QZQgPxAz3hpX8KucCauEZiv7S0HyWEWka0BiW01D YMKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SK3VReJa; 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 j7-v6si4826832plk.506.2018.05.17.01.20.21; Thu, 17 May 2018 01:20:35 -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=SK3VReJa; 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 S1752317AbeEQIUF (ORCPT + 99 others); Thu, 17 May 2018 04:20:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbeEQIUC (ORCPT ); Thu, 17 May 2018 04:20:02 -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=EpWDYULr1hY1lKJcbIzBFjEZyJKTMLy8swmux/dReWs=; b=SK3VReJapc++0bmOiuLqoxtCB mG+g+8E94B+DQ+9yeOcLsUMtb0ARJrFVP8vEDASPujFNTddMA1RXSSMM3m/yr1NvI7TtgdnyayL0M KROicpBlacuVUJDhbaQLVtKE1rYS64P5mua8Scm52Ot26JZBkXRYFBT7k1Nm0Qx5+Z8dyLsIqUFm2 oQpHqphFzc+DfNQ4x7WNA4X2knqeTkmzD/axAeLzj/KD6pq6VxyG60107YcID8GcKdDxiQu9ABjsG 1gDYqCeb9Nsk9zMzjzkA9G4fN3fsUz8KF7qJ+IBlrHkR+CHWWyQWzenkHNvy6e7LuQcRIFNyvj1XQ 0fhpkWwFw==; 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 1fJE8b-0002BQ-Vv; Thu, 17 May 2018 08:19:50 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2E0432029F86E; Thu, 17 May 2018 10:19:48 +0200 (CEST) Date: Thu, 17 May 2018 10:19:48 +0200 From: Peter Zijlstra To: Srinivas Pandruvada Cc: tglx@linutronix.de, mingo@redhat.com, bp@suse.de, lenb@kernel.org, rjw@rjwysocki.net, mgorman@techsingularity.net, x86@kernel.org, linux-pm@vger.kernel.org, viresh.kumar@linaro.org, juri.lelli@arm.com, linux-kernel@vger.kernel.org Subject: Re: [RFC/RFT] [PATCH 05/10] cpufreq: intel_pstate: HWP boost performance on IO Wake Message-ID: <20180517081948.GM12217@hirez.programming.kicks-ass.net> References: <20180516044911.28797-1-srinivas.pandruvada@linux.intel.com> <20180516044911.28797-6-srinivas.pandruvada@linux.intel.com> <20180516073701.GW12217@hirez.programming.kicks-ass.net> <1526493313.61700.61.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526493313.61700.61.camel@linux.intel.com> 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 Wed, May 16, 2018 at 10:55:13AM -0700, Srinivas Pandruvada wrote: > On Wed, 2018-05-16 at 09:37 +0200, Peter Zijlstra wrote: > > On Tue, May 15, 2018 at 09:49:06PM -0700, Srinivas Pandruvada wrote: > > Hurmph, this looks like you're starting to duplicate the schedutil > > iowait logic. Why didn't you copy the gradual boosting thing? > I tried what we implemented in intel_pstate in legacy mode, which gave > the best performance for servers (ramp up faster and slow ramp down). > This caused regression on some workloads, as each time we can call > HWP_REQUEST, we spend 1200+ cycles in issuing MSR. So keeping it at max > for timeout. Even keeping at P1 didn't help in power numbers. > > > - If the IO flags are notified multiple ticks apart, this may not be > > > IO bound task. Othewise idle system gets periodic boosts for one > > > IO wake. That is what made me think of the gradual boosting. Because that is very similar to the scenario that made us do that. But like said elsewhere, ideally we'd use schedutil exclusively and reduce intel_pstate to a pure driver. The normal way do deal with slow transitions is rate limiting. Another option is for the slow HWP msr driver we could choose to only issue the update when we reach max_freq. But if the MSR ever gets cheaper we can issue it more often/finer grained.