Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754049AbcKMOqK (ORCPT ); Sun, 13 Nov 2016 09:46:10 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35574 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752635AbcKMOqJ (ORCPT ); Sun, 13 Nov 2016 09:46:09 -0500 MIME-Version: 1.0 In-Reply-To: References: <1acfffe798c0371e69ec1171f485499e7b49ed6d.1478858983.git.viresh.kumar@linaro.org> From: "Rafael J. Wysocki" Date: Sun, 13 Nov 2016 15:46:07 +0100 X-Google-Sender-Auth: u8vmEn-MQWc2cIssenTiWEpZ_Zg Message-ID: Subject: Re: [PATCH 1/3] cpufreq: schedutil: enable fast switch earlier To: Viresh Kumar Cc: "Rafael J. Wysocki" , Rafael Wysocki , Ingo Molnar , Peter Zijlstra , Lists linaro-kernel , Linux PM , Linux Kernel Mailing List , Vincent Guittot , Juri Lelli , Robin Randhawa Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 26 On Sat, Nov 12, 2016 at 6:19 AM, Viresh Kumar wrote: > On 12 November 2016 at 03:28, Rafael J. Wysocki wrote: > >>> @@ -478,8 +484,6 @@ static void sugov_exit(struct cpufreq_policy *policy) >>> struct sugov_tunables *tunables = sg_policy->tunables; >>> unsigned int count; >>> >>> - cpufreq_disable_fast_switch(policy); >>> - >> >> ->but why is this change necessary? >> >> sugov_stop() has been called already, so the ordering here shouldn't matter. > > Because sugov_policy_free() would be using the flag fast_switch_enabled. That's only going to happen in the next patch, though, right? It wouldn't hurt to write that in the changelog too. Besides, I'm not actually sure if starting/stopping the kthread in sugov_policy_alloc/free() is a good idea. It sort of conflates the allocation of memory with kthread creation. Any chance to untangle that? Thanks, Rafael