From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbcBWOFH (ORCPT ); Tue, 23 Feb 2016 09:05:07 -0500 Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:44883 "EHLO outbound-smtp05.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752254AbcBWOFF (ORCPT ); Tue, 23 Feb 2016 09:05:05 -0500 Date: Tue, 23 Feb 2016 14:04:59 +0000 From: Mel Gorman To: Doug Smythies Cc: "'Rafael J. Wysocki'" , "'Rafael Wysocki'" , "'Ingo Molnar'" , "'Peter Zijlstra'" , "'Matt Fleming'" , "'Mike Galbraith'" , "'Linux-PM'" , "'LKML'" , "'Srinivas Pandruvada'" Subject: Re: [PATCH 1/1] intel_pstate: Increase hold-off time before busyness is scaled Message-ID: <20160223140459.GA2854@techsingularity.net> References: <1455793883-14214-1-git-send-email-mgorman@techsingularity.net> <001101d16a90$a7a26e10$f6e74a30$@net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <001101d16a90$a7a26e10$f6e74a30$@net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2016 at 01:09:26PM -0800, Doug Smythies wrote: > >> +++ b/drivers/cpufreq/intel_pstate.c > >> @@ -999,7 +999,7 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu) > >> sample_time = pid_params.sample_rate_ms * USEC_PER_MSEC; > >> duration_us = ktime_us_delta(cpu->sample.time, > >> cpu->last_sample_time); > >> - if (duration_us > sample_time * 3) { > >> + if (duration_us > sample_time * 12) { > >> sample_ratio = div_fp(int_tofp(sample_time), > >> int_tofp(duration_us)); > >> core_busy = mul_fp(core_busy, sample_ratio); > >> -- > > The immediately preceding comment needs to be changed also. > Note that with duration related scaling only coming in at such a high > ratio it might be worth saving the divide and just setting it to 0. > I tried this and FWIW, the performance is generally comparable as is the power usage as reported by turbostat. On occasion, depending on the machine, the system CPU usage is noticably lower. -- Mel Gorman SUSE Labs