From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755209AbdLTM5Y (ORCPT ); Wed, 20 Dec 2017 07:57:24 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:41903 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753868AbdLTM5W (ORCPT ); Wed, 20 Dec 2017 07:57:22 -0500 Date: Wed, 20 Dec 2017 13:57:05 +0100 From: Peter Zijlstra To: Juri Lelli Cc: Patrick Bellasi , mingo@redhat.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, tglx@linutronix.de, vincent.guittot@linaro.org, rostedt@goodmis.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, tkjos@android.com, joelaf@google.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, alessio.balsini@arm.com, Juri Lelli , Ingo Molnar , "Rafael J . Wysocki" Subject: Re: [RFC PATCH v2 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Message-ID: <20171220125705.djemtgopmmthzqjz@hirez.programming.kicks-ass.net> References: <20171204102325.5110-1-juri.lelli@redhat.com> <20171204102325.5110-4-juri.lelli@redhat.com> <20171205115509.GK31247@e110439-lin> <20171205123400.GA15085@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171205123400.GA15085@localhost.localdomain> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 05, 2017 at 01:34:00PM +0100, Juri Lelli wrote: > > What about using for all these wrappers the same utility function you > > already use in this source file? I.e. > > > > if (unlikely(dl_entity_is_special(dl_se))) > > return; > > __add_rq_bw(dl_se->dl_bw, dl_rq); > > > +static inline int dl_entity_is_special(struct sched_dl_entity *dl_se) > > > +{ > > #ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL > > > + return dl_se->flags & SCHED_FLAG_SUGOV; > > #else > > return false; > > #endif > > > +} Move the unlikely in here, saves on typing.