lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] PM / EM: Skip inefficient OPPs
On Friday 21 May 2021 at 17:54:24 (+0100), Vincent Donnefort wrote:
> @@ -161,6 +162,8 @@ static int em_create_perf_table(struct device *dev, struct em_perf_domain *pd,
> table[i].cost = div64_u64(fmax * table[i].power,
> table[i].frequency);
> if (table[i].cost >= prev_cost) {
> + table[i].flags = EM_PERF_STATE_INEFFICIENT;
> + pd->flags |= EM_PERF_DOMAIN_INEFFICIENCIES;

If we're looking for micro-optimizations, then perhaps you could store
the index of the next efficient OPP (which would be 'i' if the current
OPP is already efficient), so you can jump to it directly when doing the
search.

> dev_dbg(dev, "EM: OPP:%lu is inefficient\n",
> table[i].frequency);
> } else {

\
 
 \ /
  Last update: 2021-05-25 11:34    [W:0.860 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site