From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754925AbdKATfn (ORCPT ); Wed, 1 Nov 2017 15:35:43 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:53422 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbdKATfl (ORCPT ); Wed, 1 Nov 2017 15:35:41 -0400 X-Google-Smtp-Source: ABhQp+RTreltRPp4TdVO/5dultNFB3JelnKJbT32N7A421hY5VNqRXdsYw8FT8v18fnURLv4WCS6RQ== Subject: Re: [PATCH RFC 2/5] sched/fair: Skip frequency update if CPU about to idle To: Joel Fernandes , Viresh Kumar Cc: LKML , "Rafael J . Wysocki" , Ingo Molnar , Peter Zijlstra , "Cc: Srinivas Pandruvada" , "Cc: Len Brown" , "Cc: Juri Lelli" , "Cc: Patrick Bellasi" , "Cc: Brendan Jackman" , "Cc: Chris Redpath" , "Cc: Atish Patra" , "Cc: Dietmar Eggemann" , "Cc: Vincent Guittot" , "Cc: Morten Ramussen" , "Cc: Frederic Weisbecker" , "Cc: Thomas Gleixner" , "Cc: EAS Dev" , "Cc: Android Kernel" , Steven Rostedt References: <20171028095941.4773-1-joelaf@google.com> <20171028095941.4773-3-joelaf@google.com> <20171030120709.GO4240@vireshk-i7> From: Steve Muckle Message-ID: <6ed7d641-4fa2-77e1-9294-64d51193c786@google.com> Date: Wed, 1 Nov 2017 12:35:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/2017 12:02 PM, Joel Fernandes wrote: >> Also, this more looks like a policy decision. Will it be better to >> put that directly into schedutil? Like this: >> >> if (cpu_idle()) >> "Don't change the freq"; >> >> Will something like that work? > > I thought about this and I think it wont work very well. In the > dequeue path we're still running the task being dequeued so the CPU is > not yet idle. What is needed here IMO is a notion that the CPU is > possibly about to idle and we can get predict that from the dequeue > path of the CFS class. > > Also just looking at whether the CPU is currently idle or not in the > governor doesn't help to differentiate between say the dequeue path / > tick path. Both of which can occur when the CPU is not idle. > > Any thoughts about this? Also if it really is the case that this bit of policy is universally desirable, I'd think it is better to do this in the scheduler and avoid a needless trip through a fn pointer out to schedutil for performance reasons.