Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1653196imm; Wed, 16 May 2018 00:44:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZofzFX3Wi+pVCZg0c1guUHfVPQEH4WCF6wHvlPdRTH8JWScvyr3M9T68BknyOY469OMKVxM X-Received: by 2002:a17:902:bb92:: with SMTP id m18-v6mr10002129pls.46.1526456647562; Wed, 16 May 2018 00:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526456647; cv=none; d=google.com; s=arc-20160816; b=TOHiAeCzGK7AN9IcK6N1O9yoyhjYckJsX+iObqByQsQW2GJHx84wxY0NXoL2upeygS znrj9oeHKAbqgPRi/ZbePXLGlYsKkksMurCExX7M54Ee1RHcub56v54/LC2rpQ6WHGLR KuoUBh5toqTaEtwZBRfZyrpqdCV+ZpoyDu61io+N7x1G22AArYEc8HWVi79fgdg8elcx cKCi06bwC89jrMjuLeRmzrfYPiXTidzQvx+MIkPfjJ/ucAamGeC61kcMlMheBz3AcqKS BOh+FvAmWrxEVZx3qoigC4vpnG024QGLZNClq6CZQ0V2mNfJNcenW8DyIjYHlwr43vGO XR+g== 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=7XlErj0byKTxiwA5xR1T5zBzejv1B/JFkNm27dmdyKk=; b=nNBKJ7arnOkk42LeYqTfr/Ai3ANQZ5XwGB/M8HVb9oQkvHM7ko/i3mpUy5P2k8EiNr PWZEPfoHZdqNUXAlWkb7ntx7dRG13+AgZ3omzvLwJt+Z8jg0DYTjKKLIbUmMCXOfL3pb cFuIdmSiM1c92BepK7e5FQP2CaRlI0Las3Oh/Kwo40dprxwCWWQpGHovTLPhuZv/cyKq DQGzTmD7YbV1G0dP6Hslm31aoXtLjSzoQBoAc0rFPptlY+5x5p4tB9HBWbmZDNEB8M19 pPfqo2nXMF3pDZ/0oY2bPxi3VXDCrr1xHS7sdtCJf/jTOojnivA5jOdpEEUQwKzmCPmM CEuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SACKy4Q+; 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 132-v6si1578263pgb.674.2018.05.16.00.43.53; Wed, 16 May 2018 00:44:07 -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=SACKy4Q+; 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 S1752573AbeEPHnZ (ORCPT + 99 others); Wed, 16 May 2018 03:43:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37200 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbeEPHnX (ORCPT ); Wed, 16 May 2018 03:43:23 -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=7XlErj0byKTxiwA5xR1T5zBzejv1B/JFkNm27dmdyKk=; b=SACKy4Q+apNFEDPoGdDggimsg E5gCbwkN7eD/upjMB4YFXXbNkvW/csHTr17Y3/mlwuhLeOtMTK3SPJeHRZtMRAQ2O2X5yXObBoshZ KDQga0M4A25Szb1QZBprdm4T0gzUf8YGvQtq5GsQm2oPr+OsPeTk2dty4uJbdyvVpWKsYubGVhGFt /uS3kBEHzYoiRPhqJBmSZqHFYbjyvVCdXyyYl+sW7Rdltff0aJIPy7orhC0ZAJ4gVRXTNOJ2zCapX K6uLZYpQztqg2gVh2w5FxbCQqxRYjVmaZZOl9OZNLS66AKDASLI+4AbTis9UNPZMGGNgUEleYGzyB antZl2iVw==; 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 1fIr5W-0004Ui-Jv; Wed, 16 May 2018 07:43:06 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C6AC32029F1C1; Wed, 16 May 2018 09:43:04 +0200 (CEST) Date: Wed, 16 May 2018 09:43:04 +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 08/10] cpufreq: intel_pstate: Dyanmically update busy pct Message-ID: <20180516074304.GX12217@hirez.programming.kicks-ass.net> References: <20180516044911.28797-1-srinivas.pandruvada@linux.intel.com> <20180516044911.28797-9-srinivas.pandruvada@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180516044911.28797-9-srinivas.pandruvada@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 Tue, May 15, 2018 at 09:49:09PM -0700, Srinivas Pandruvada wrote: > +static inline void intel_pstate_update_busy_threshold(struct cpudata *cpu) > +{ > + /* P1 percent out of total range of P-states */ > + if (cpu->pstate.max_freq != cpu->pstate.turbo_freq) { > + hwp_boost_pstate_threshold = > + cpu->pstate.max_freq * SCHED_CAPACITY_SCALE / cpu->pstate.turbo_freq; > + pr_debug("hwp_boost_pstate_threshold = %d\n", > + hwp_boost_pstate_threshold); > + } > + > +} > + > static inline void intel_pstate_update_util_hwp(struct update_util_data *data, > u64 time, unsigned int flags) > { > @@ -2061,8 +2097,10 @@ static int __intel_pstate_cpu_init(struct cpufreq_policy *policy) > > policy->fast_switch_possible = true; > > - if (hwp_active) > + if (hwp_active) { > csd_init(cpu); > + intel_pstate_update_busy_threshold(cpu); > + } > > return 0; > } This should go in patch #5 and then you can remove that SKX hack. Which you left in, even though you now did it right.