From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752179AbcBJXLv (ORCPT ); Wed, 10 Feb 2016 18:11:51 -0500 Received: from cmta4.telus.net ([209.171.16.77]:43562 "EHLO cmta4.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbcBJXLu (ORCPT ); Wed, 10 Feb 2016 18:11:50 -0500 X-Authority-Analysis: v=2.1 cv=TLK4MARa c=1 sm=2 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=IkcTkHD0fZMA:10 a=S9Y6gY9tKDqERtcI8xIA:9 a=QEXdDO2ut3YA:10 X-Telus-Outbound-IP: 173.180.45.4 From: "Doug Smythies" To: "'Rafael J. Wysocki'" , "'Linux PM list'" , "'Ingo Molnar'" Cc: "'Linux Kernel Mailing List'" , "'Peter Zijlstra'" , "'Srinivas Pandruvada'" , "'Viresh Kumar'" , "'Juri Lelli'" , "'Steve Muckle'" , "'Thomas Gleixner'" References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <2111826.yKEUOzphHC@vostro.rjw.lan> In-Reply-To: <2111826.yKEUOzphHC@vostro.rjw.lan> Subject: RE: [PATCH v6 0/3] cpufreq: Replace timers with utilization update callbacks Date: Wed, 10 Feb 2016 15:11:43 -0800 Message-ID: <008201d16458$69b2a4f0$3d17eed0$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdFkGNg4vKxSU5+5SKuaIsFdsiI2yAAOSv/w Content-Language: en-ca Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016.02.10 07:17 Rafael J. Wysocki wrote: > On Friday, January 29, 2016 11:52:15 PM Rafael J. Wysocki wrote: >> >> The following patch series introduces a mechanism allowing the cpufreq core >> and "setpolicy" drivers to provide utilization update callbacks to be invoked >> by the scheduler on utilization changes. Those callbacks can be used to run >> the sampling and frequency adjustments code (intel_pstate) or to schedule the >> execution of that code in process context (cpufreq core) instead of per-CPU >> deferrable timers used in cpufreq today (which Thomas complained about during >> the last Kernel Summit). This patch set solves a long standing issue with the intel_pstate driver. The issue began with the introduction of the "duration" method for deciding if the CPU had been idle for a long time resulting in forcing the target pstate downwards. Often this was the correct action, but sometimes this was the wrong thing to do, because the cpu was actually very busy, but just so happened to be idle on jiffy boundaries (perhaps similar to what Steve Muckle was referring to on another branch of this thread). For an idle system, this patch set seems to change the maximum duration from 4 seconds to 0.5 seconds for most CPUs. However, when using v1 of patches 1 and 2 of 3 and v5 of 3 of 3, sometimes the durations (time between passes of the intel-pstate driver for a given CPU) of upwards of 120 seconds were observed. When patches 1, 2, and 3 of 3 v6 were used, the maximum observed durations of an idle system were on the order of 500 milliseconds for most CPUs, but CPU 6 sometimes went to 3.5 seconds and CPU 7 sometimes went to 4 seconds (small sample space, I'll consider to run an overnight test for a much much larger sample space). Note 4 seconds, is O.K., and what it was before, I'm just noting it is all. I have a bunch of graphs, if anyone wants to see the supporting data. My test computer has an older model i7 (Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz)