Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933648AbdGKTQ4 (ORCPT ); Tue, 11 Jul 2017 15:16:56 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42016 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932802AbdGKTQy (ORCPT ); Tue, 11 Jul 2017 15:16:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 25A2F60796 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=skannan@codeaurora.org Message-ID: <59652423.8000806@codeaurora.org> Date: Tue, 11 Jul 2017 12:16:51 -0700 From: Saravana Kannan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Juri Lelli CC: Joel Fernandes , Patrick Bellasi , LKML , Linux PM , Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Andres Oportus , Todd Kjos , Morten Rasmussen , Dietmar Eggemann Subject: Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter References: <1499189651-18797-1-git-send-email-patrick.bellasi@arm.com> <1499189651-18797-3-git-send-email-patrick.bellasi@arm.com> <20170707101704.qncj373s3eliit2y@e106622-lin> In-Reply-To: <20170707101704.qncj373s3eliit2y@e106622-lin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1288 Lines: 39 On 07/07/2017 03:17 AM, Juri Lelli wrote: > On 06/07/17 21:43, Joel Fernandes wrote: >> On Tue, Jul 4, 2017 at 10:34 AM, Patrick Bellasi >> wrote: > > [...] > >>> @@ -304,6 +304,12 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, >>> >>> sg_cpu->util = util; >>> sg_cpu->max = max; >>> + >>> + /* CPU is entering IDLE, reset flags without triggering an update */ >>> + if (unlikely(flags & SCHED_CPUFREQ_IDLE)) { >>> + sg_cpu->flags = 0; >>> + goto done; >>> + } >> >> Instead of defining a new flag for idle, wouldn't another way be to >> just clear the flag from the RT scheduling class with an extra call to >> cpufreq_update_util with flags = 0 during dequeue_rt_entity? That >> seems to me to be also the right place to clear the flag since the >> flag is set in the corresponding class to begin with. >> > > Make sense to me too. Also considering that for DL (with my patches) we > don't generally want to clear the flag at dequeue time, but only when > the 0-lag timer fires. > Makes sense to me too. -Saravana -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project