Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753552AbeAFQNA (ORCPT + 1 other); Sat, 6 Jan 2018 11:13:00 -0500 Received: from cmta17.telus.net ([209.171.16.90]:55472 "EHLO cmta17.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753388AbeAFQM6 (ORCPT ); Sat, 6 Jan 2018 11:12:58 -0500 X-Authority-Analysis: v=2.2 cv=Dfz4krlW c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=IkcTkHD0fZMA:10 a=VwQbUJbxAAAA:8 a=qUABwg5-UwU-FZ-TeDQA:9 a=QEXdDO2ut3YA:10 a=AjGcO6oz07-iQ99wixmX:22 From: "Doug Smythies" To: "'Leonard Crestez'" , , "'Viresh Kumar'" , "'Rafael J. Wysocki'" , "'Steve Muckle'" Cc: "'Anson Huang'" , , "Doug Smythies" References: XYkGesLZd7WleXYkHe0H9k In-Reply-To: XYkGesLZd7WleXYkHe0H9k Subject: RE: [BUG] schedutil governor produces regular max freq spikes because of lockup detector watchdog threads Date: Sat, 6 Jan 2018 08:12:52 -0800 Message-ID: <000001d38709$363d5180$a2b7f480$@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: AdOGZQi4d+iQyMktRZOJubx6FV3DhgAn2BQw Content-Language: en-ca X-CMAE-Envelope: MS4wfLZM4JHo1QuIwzPAjmbVOmgqgPZ4d234KGEphfbr6KwFFXm56i4fncdRpY6FEXyuVl7GOIugyh7+ogEjxfy163iZkAZXmIFbKCA+YcffELRXl+QCRKfO pUL6+zfoh3ABdKnO+8/KmupZ/1S8dyYp8hqvyIFnT0FviRhr3Abz1ygTphwPSBoxIt/5ZQxwjSfa3V75+W0lWyJzZy1LEQlo2k7g5n7wA3TIrvMw3d1hEtR2 rj2s/SrzqYpjhDpnHrQKQ2FWCnChXRxu0QCW8p/UgiU8DmTSPPWDdFDUo73QuJ5TRXgotI1C1oaO3AbvHDV4DnBFeZCUX7uWH8xCgavY6zNIaHfIe3ccCWFN JTqd6GtLB1+ipTwnWVLqoS45jAjy+utlYrb+aTho87SJLaO28u0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 2018.01.05 12:38 Leonard Crestez wrote: > When using the schedutil governor together with the softlockup detector > all CPUs go to their maximum frequency on a regular basis. This seems > to be because the watchdog creates a RT thread on each CPU and this > causes regular kicks with: > > cpufreq_update_this_cpu(rq, SCHED_CPUFREQ_RT); > > The schedutil governor responds to this by immediately setting the > maximum cpu frequency, this is very undesirable. > > The issue can be fixed by this patch from android: > https://patchwork.kernel.org/patch/9301909/ > > The patch stalled in a long discussion about how it's difficult for > cpufreq to deal with RT and how some RT users might just disable > cpufreq. It is indeed hard but if the system experiences regular power > kicks from a common debug feature they will end up disabling schedutil > instead. No other governors behave this way, perhaps the current > behavior should be considered a bug in schedutil. > > That patch now has conflicts with latest upstream. Perhaps a modified > variant should be reconsidered for inclusion, or is there some other > solution pending? > > Alternatively the watchdog threads could be somehow marked as to never > cause increased cpufreq. Your e-mail was very timely for me. In mid December, while testing the minimum sampling rate change commit, I also did a reference test using intel-cpufreq driver and schedutil governor. Under a range of conditions 79% more package power was consumed by schedutil when compared to: ondemand, sample rate 2 mSec; ondemand, sample rate 20 mSec; intel_pstate driver. I did not know about the thread and patch you referred to. Thanks. Additionally, on otherwise mostly idle CPUs, sometimes I observe that after the setting of max pstate, it gets left there with no update at all for over a hundred seconds. Examples: CPU3: 165 seconds since change to max pstate; Load 0.07%; new pstate = minimum CPU5: 121 seconds since change to max pstate; Load 0.47%; new pstate = mid range Reference (for me only): trace_stuff/results/pass24 samples 59797 and 59803 ... Doug