From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758670AbdLRMPB (ORCPT ); Mon, 18 Dec 2017 07:15:01 -0500 Received: from foss.arm.com ([217.140.101.70]:49522 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529AbdLRMO7 (ORCPT ); Mon, 18 Dec 2017 07:14:59 -0500 Date: Mon, 18 Dec 2017 12:14:53 +0000 From: Patrick Bellasi To: Viresh Kumar Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Ingo Molnar , Peter Zijlstra , Linux PM , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Linux Kernel Mailing List Subject: Re: [PATCH 2/4] sched: cpufreq: Keep track of cpufreq utilization update flags Message-ID: <20171218121453.GH19821@e110439-lin> References: <20456740.6R3DDKEUDv@aspire.rjw.lan> <20171218045945.GG19815@vireshk-i7> <20171218115943.GL19815@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171218115943.GL19815@vireshk-i7> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-Dec 17:29, Viresh Kumar wrote: > On 18-12-17, 12:35, Rafael J. Wysocki wrote: > > Well, if SCHED_CPUFRREQ_CLEAR means "this CPU is going to enter the > > idle loop" really, then it is better to call it > > SCHED_CPUFRREQ_ENTER_IDLE, for example. > > > > SCHED_CPUFRREQ_CLEAR meaning basically "you should clear these flags > > now" doesn't seem to convey any information to whoever doesn't > > squirrel the flags in the first place. > > Right, but when all the flags are cleared, then we can infer that we > are going to idle in the most probable case. > > Anyway, I will implement RT and DL clear flags as you suggested in the > next version. I think Rafael is right, the current API is a big odd since we cannot really set the CLEAR flags by itself. I mean, you can but it will not have effects. Thus, it's probably better from an API standpoint to have a dedicated single clear flag... unfortunately it has to be one per class, which is still not optimal and will likely make the policy code a bit odd. What about extending the signature of the callback method? For example, swithing from: - void (*func)(struct update_util_data *data, u64 time, - unsigned int flags)) + void (*func)(struct update_util_data *data, u64 time, + unsigned int flags, bool set)) Where the additional boolean is actually used to define which operation we wanna perform on the flags? -- #include Patrick Bellasi