From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdCNQHa (ORCPT ); Tue, 14 Mar 2017 12:07:30 -0400 Received: from cmta20.telus.net ([209.171.16.93]:43260 "EHLO cmta20.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbdCNQG7 (ORCPT ); Tue, 14 Mar 2017 12:06:59 -0400 X-Authority-Analysis: v=2.2 cv=d7Ma8VrE c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=kj9zAlcOel0A:10 a=QyXUC8HyAAAA:8 a=rErlQK3DjdtTvsr4mJsA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=avl4LiGQNoF5OB0DmCJ7:22 From: "Doug Smythies" To: "'Rafael J. Wysocki'" Cc: "'LKML'" , "'Srinivas Pandruvada'" , "'Linux PM'" References: <5656785.7SEhxaGEOz@aspire.rjw.lan> n7P3c1QOAsVy3n7P4cDilq In-Reply-To: n7P3c1QOAsVy3n7P4cDilq Subject: RE: [PATCH 07/14] cpufreq: intel_pstate: Skip unnecessary PID resets on init Date: Tue, 14 Mar 2017 09:06:52 -0700 Message-ID: <000001d29cdd$00458ff0$00d0afd0$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdKbVw41pvP0IlwvQQCvNPOuiwrTvgBg1y+g Content-Language: en-ca X-CMAE-Envelope: MS4wfIOua3FzF8dD5JUyjxh+ogywic4NF0WbQ94jwVeC1Eyt14Bs+kScUxAui+o0KAhvLR+nBGzk5bNq+huHzYtXzSrsxpp60ORTLMWGURXlFEKa6ULsMBA5 mkhtbRR9LXVjr65LoGLFlo7yKS6/XuO0IsxD1a8PoX2U5OSfoNnmYmIeRZSQ6kgztUYk2bGVenKXkAX+k9fJQ/ZX60Ij8irE+Rp7wUbGK+zrdpQn8hGC+fnv KyWwLExZyhiwYh+ySnAgFwIIxQ8xbb1qL8RF5bSGAnTJqzvfQpjet2CwF+v0Tx+a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017.03.12 10:19 Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > PID controller parameters only need to be initialized if the > get_target_pstate_use_performance() P-state selection routine > is going to be used. It is not necessary to initialize them > otherwise, so don't do that. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/cpufreq/intel_pstate.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > Index: linux-pm/drivers/cpufreq/intel_pstate.c > =================================================================== > --- linux-pm.orig/drivers/cpufreq/intel_pstate.c > +++ linux-pm/drivers/cpufreq/intel_pstate.c > @@ -1974,12 +1974,12 @@ static int intel_pstate_init_cpu(unsigne > intel_pstate_disable_ee(cpunum); > > intel_pstate_hwp_enable(cpu); > + } else if (pstate_funcs.get_target_pstate == get_target_pstate_use_performance) { > + intel_pstate_pid_reset(cpu); > } > > intel_pstate_get_cpu_pstates(cpu); > > - intel_pstate_pid_reset(cpu); > - > pr_debug("controlling: cpu %d\n", cpunum); > > return 0; Hi Rafael, The patch has a long line and scripts/checkpatch.pl complains. $ scripts/checkpatch.pl rjw_7_14.txt WARNING: line over 80 characters #27: FILE: drivers/cpufreq/intel_pstate.c:1977: + } else if (pstate_funcs.get_target_pstate == get_target_pstate_use_performance) { total: 0 errors, 1 warnings, 14 lines checked Myself, I don't care, and only found this by accident. I am just passing along the information. ... Doug