From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754666AbdCTMm5 (ORCPT ); Mon, 20 Mar 2017 08:42:57 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:56998 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753442AbdCTMmp (ORCPT ); Mon, 20 Mar 2017 08:42:45 -0400 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: "Rafael J. Wysocki" , Linux PM , LKML , Srinivas Pandruvada Subject: Re: [PATCH] cpufreq: Restore policy min/max limits on CPU online Date: Mon, 20 Mar 2017 13:30 +0100 Message-ID: <3593437.Z2HPvjKf4F@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.10.0+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20170320032156.GG31040@vireshk-i7> References: <2084010.4xkKok06Gp@aspire.rjw.lan> <20170320032156.GG31040@vireshk-i7> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, March 20, 2017 08:51:56 AM Viresh Kumar wrote: > On 17-03-17, 18:40, Rafael J. Wysocki wrote: > > On Fri, Mar 17, 2017 at 5:43 PM, Viresh Kumar wrote: > > > On 17 March 2017 at 22:01, Rafael J. Wysocki wrote: > > > > > >> IMO if we are not going to restore the governor, we also should not > > >> restore the limits as those things are related. Now, the governor can > > >> be unloaded while the CPU is offline. > > > > > > I thought about it earlier but then governor and policy min/max > > > looked independent to me. Why do you think they are related? > > > > They are parts of one set of settings. > > > > If the governor is not restored, the policy starts with the default > > one, so why would it not start with the default limits then? > > Do we reset the limits when we change governor's normally? No. Then > why should we consider suspend/resume special in that sense? These are > completely different and independent settings which user has done and > we don't really need to relate them. > > > My opinion is that either we restore everything the way it was, or we > > start afresh entirely. > > What about fields like: policy->user_policy.*? They aren't reset for > existing policies if the last governor isn't found. And there are > drivers which call cpufreq_update_policy(), and that would mean that > the CPU will come back to user defined policies before system > suspended. And that kind of defeats whatever you were trying to do in > this patch. Isn't it? OK, it looks like I don't care as much as you do. :-) Send the patch with a changelog. Thanks, Rafael