From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [PATCH 2/6] cpufreq: schedutil: ignore the sugov kthread for frequencies selections Date: Mon, 6 Mar 2017 09:35:41 -0500 Message-ID: <20170306093541.0cb8d4d3@gandalf.local.home> References: <1488469507-32463-1-git-send-email-patrick.bellasi@arm.com> <1488469507-32463-3-git-send-email-patrick.bellasi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mail.kernel.org ([198.145.29.136]:53044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754617AbdCFOfs (ORCPT ); Mon, 6 Mar 2017 09:35:48 -0500 In-Reply-To: <1488469507-32463-3-git-send-email-patrick.bellasi@arm.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Vincent Guittot , John Stultz , Juri Lelli , Todd Kjos , Tim Murray , Andres Oportus , Joel Fernandes , Morten Rasmussen , Dietmar Eggemann , Chris Redpath , Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" On Thu, 2 Mar 2017 15:45:03 +0000 Patrick Bellasi wrote: > @@ -287,6 +289,10 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, > goto done; > } > > + /* Skip updates generated by sugov kthreads */ > + if (curr == sg_policy->thread) I think you want to put in an "unlikely()" around that statement. I'm assuming you don't care about he performance of scheduling in the sugov thread. At least tell gcc to optimize for the false path. -- Steve > + goto done; > + > sg_cpu->util = util; > sg_cpu->max = max; > sg_cpu->flags = flags;