lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190621144716.2322iylanmvwja5c@e110439-lin>
Date:   Fri, 21 Jun 2019 15:47:16 +0100
From:   Patrick Bellasi <patrick.bellasi@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>, Tejun Heo <tj@...nel.org>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Paul Turner <pjt@...gle.com>,
        Quentin Perret <quentin.perret@....com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Todd Kjos <tkjos@...gle.com>,
        Joel Fernandes <joelaf@...gle.com>,
        Steve Muckle <smuckle@...gle.com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Alessio Balsini <balsini@...roid.com>
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ