Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941335AbcKOIXl (ORCPT ); Tue, 15 Nov 2016 03:23:41 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:35725 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933425AbcKOIXk (ORCPT ); Tue, 15 Nov 2016 03:23:40 -0500 From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Ingo Molnar , Peter Zijlstra , Juri Lelli , Robin Randhawa , Steve Muckle , Viresh Kumar Subject: [PATCH V2 0/4] cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task Date: Tue, 15 Nov 2016 13:53:19 +0530 Message-Id: X-Mailer: git-send-email 2.7.1.410.g6faf27b Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 41 Hi, If slow path frequency changes are conducted in a SCHED_OTHER context then they may be delayed for some amount of time, including indefinitely, when real time or deadline activity is taking place. Move the slow path to a real time kernel thread using the kthread worker infrastructure. In the future the thread should be made SCHED_DEADLINE. The RT priority is arbitrarily set to 50 for now. This was tested with Hackbench on ARM Exynos, dual core A15 platform and no regressions were seen. The third patch has more details on it. This work was started by Steve Muckle, where he used a simple kthread instead of kthread-worker and that wasn't sufficient as some guarantees weren't met. I was wondering if the same should be done for ondemand/conservative governors as well ? V1->V2: - first patch is new based on Peter's suggestions. - fixed indented label - Moved kthread creation/destruction into separate routines - Used MACRO instead of magic number '50' - minor formatting, commenting and improved commit logs -- viresh Viresh Kumar (4): cpufreq: schedutil: Avoid indented labels cpufreq: schedutil: enable fast switch earlier cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task cpufreq: schedutil: irq-work and mutex are only used in slow path kernel/sched/cpufreq_schedutil.c | 119 ++++++++++++++++++++++++++++++++------- 1 file changed, 99 insertions(+), 20 deletions(-) -- 2.7.1.410.g6faf27b