Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755211AbdC1RUl (ORCPT ); Tue, 28 Mar 2017 13:20:41 -0400 Received: from foss.arm.com ([217.140.101.70]:52614 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753290AbdC1RUk (ORCPT ); Tue, 28 Mar 2017 13:20:40 -0400 Date: Tue, 28 Mar 2017 18:20:05 +0100 From: Patrick Bellasi To: Peter Zijlstra Cc: Steven Rostedt , Dietmar Eggemann , Ingo Molnar , LKML , Matt Fleming , Vincent Guittot , Morten Rasmussen , Juri Lelli Subject: Re: [RFC PATCH 2/5] sched/events: Introduce cfs_rq load tracking trace event Message-ID: <20170328172005.GF11362@e110439-lin> References: <20170328063541.12912-1-dietmar.eggemann@arm.com> <20170328063541.12912-3-dietmar.eggemann@arm.com> <20170328104600.18d36cb0@gandalf.local.home> <20170328164459.tkiqbtb7yaplygng@hirez.programming.kicks-ass.net> <20170328165754.u3nwxjveyhkh75fo@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170328165754.u3nwxjveyhkh75fo@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1594 Lines: 52 On 28-Mar 18:57, Peter Zijlstra wrote: > On Tue, Mar 28, 2017 at 06:44:59PM +0200, Peter Zijlstra wrote: > > --- > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -2849,7 +2849,7 @@ static u32 __compute_runnable_contrib(u6 > > * = u_0 + u_1*y + u_2*y^2 + ... [re-labeling u_i --> u_{i+1}] > > */ > > static __always_inline int > > -__update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > +___update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > unsigned long weight, int running, struct cfs_rq *cfs_rq) > > { > > u64 delta, scaled_delta, periods; > > @@ -2953,6 +2953,26 @@ __update_load_avg(u64 now, int cpu, stru > > return decayed; > > } > > > > +static int > > +__update_load_avg_blocked_se(u64 now, int cpu, struct sched_avg *sa) > > +{ > > + return ___update_load_avg(now, cpu, sa, 0, 0, NULL); > > +} > > + > > +static int > > +__update_load_avg_se(u64 now, int cpu, struct sched_avg *sa, > > + unsigned long weight, int running) > > +{ > > + return ___update_load_avg(now, cpu, sa, weight, running, NULL); > > +} > > + > > +static int > > +__update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > + unsigned long weight, int running, struct cfs_rq *cfs_rq) __attribute__((nonnull (6))); > > +{ > > + return ___update_load_avg(now, cpu, sa, weight, running, cfs_rq); > > Although ideally we'd be able to tell the compiler that cfs_rq will not > be NULL here. Hurmph.. no __builtin for that I think :/ What about the above attribute? > > > +} -- #include Patrick Bellasi