lkml.org 
[lkml]   [2019]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 11/16] sched/fair: uclamp: Add uclamp support to energy_compute()
On 21-Jun 16:01, Peter Zijlstra wrote:
> On Fri, Jun 21, 2019 at 09:42:12AM +0100, Patrick Bellasi wrote:
>
> > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> > index ce2da8b9ff8c..f81e8930ff19 100644
> > --- a/kernel/sched/sched.h
> > +++ b/kernel/sched/sched.h
> > @@ -2322,7 +2322,6 @@ static inline unsigned long capacity_orig_of(int cpu)
> > }
> > #endif
> >
> > -#ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL
> > /**
> > * enum schedutil_type - CPU utilization type
> > * @FREQUENCY_UTIL: Utilization used to select frequency
> > @@ -2338,15 +2337,11 @@ enum schedutil_type {
> > ENERGY_UTIL,
> > };
> >
> > -unsigned long schedutil_freq_util(int cpu, unsigned long util_cfs,
> > - unsigned long max, enum schedutil_type type);
> > -
> > -static inline unsigned long schedutil_energy_util(int cpu, unsigned long cfs)
> > -{
> > - unsigned long max = arch_scale_cpu_capacity(NULL, cpu);
>
> That conflicts with the patch I have removing that NULL argument, fixed
> it up.

Ok, I notice only know you have this:

commit 119fd437f412 ("sched/topology: Remove unused sd param from arch_scale_cpu_capacity()")

from Vincent on your queue. :/


> > +#ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL
> >
> > - return schedutil_freq_util(cpu, cfs, max, ENERGY_UTIL);
> > -}
> > +unsigned long schedutil_cpu_util(int cpu, unsigned long util_cfs,
> > + unsigned long max, enum schedutil_type type,
> > + struct task_struct *p);
> >
> > static inline unsigned long cpu_bw_dl(struct rq *rq)
> > {
> > @@ -2375,11 +2370,8 @@ static inline unsigned long cpu_util_rt(struct rq *rq)
> > return READ_ONCE(rq->avg_rt.util_avg);
> > }
> > #else /* CONFIG_CPU_FREQ_GOV_SCHEDUTIL */
> > -static inline unsigned long schedutil_energy_util(int cpu, unsigned long cfs)
> > -{
> > - return cfs;
> > -}
> > -#endif
> > +#define schedutil_cpu_util(cpu, util_cfs, max, type, p) 0
>
> Was there a good reason for this to be a macro and not an inline
> function?

Mmm... not really, apart perhaps saving some lines.

I notice sometimes we use macros (e.g. perf_domain_span), but it's
certainly not the most common pattern.

> I've changed it, if it explodes in 0day, it's all my fault ;-)

Sure, I guess if 0day explodes will not be for that change. :)


--
#include <best/regards.h>

Patrick Bellasi

\
 
 \ /
  Last update: 2019-06-21 16:47    [W:0.078 / U:6.656 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site