lkml.org 
[lkml]   [2019]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/7] PM: Introduce em_pd_get_higher_freq()
On Thursday 16 May 2019 at 13:42:00 (+0100), Patrick Bellasi wrote:
> > +static inline unsigned long em_pd_get_higher_freq(struct em_perf_domain *pd,
> > + unsigned long min_freq, unsigned long cost_margin)
> > +{
> > + unsigned long max_cost = 0;
> > + struct em_cap_state *cs;
> > + int i;
> > +
> > + if (!pd)
> > + return min_freq;
> > +
> > + /* Compute the maximum allowed cost */
> > + for (i = 0; i < pd->nr_cap_states; i++) {
> > + cs = &pd->table[i];
> > + if (cs->frequency >= min_freq) {
> > + max_cost = cs->cost + (cs->cost * cost_margin) / 1024;
> ^^^^
> ... end here we should probably better use SCHED_CAPACITY_SCALE
> instead of hard-coding in values, isn't it?

I'm not sure to agree. This isn't part of the scheduler per se, and the
cost thing isn't in units of capacity, but in units of power, so I don't
think SCHED_CAPACITY_SCALE is correct here.

But I agree these hard coded values (that one, and the 512 in one of the
following patches) could use some motivation :-)

Thanks,
Quentin

\
 
 \ /
  Last update: 2019-05-16 15:02    [W:0.035 / U:4.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site