Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754734AbdCFOgE (ORCPT ); Mon, 6 Mar 2017 09:36:04 -0500 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 Date: Mon, 6 Mar 2017 09:35:41 -0500 From: Steven Rostedt 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" Subject: Re: [PATCH 2/6] cpufreq: schedutil: ignore the sugov kthread for frequencies selections Message-ID: <20170306093541.0cb8d4d3@gandalf.local.home> In-Reply-To: <1488469507-32463-3-git-send-email-patrick.bellasi@arm.com> References: <1488469507-32463-1-git-send-email-patrick.bellasi@arm.com> <1488469507-32463-3-git-send-email-patrick.bellasi@arm.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 601 Lines: 21 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;