[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YKz2bz6EiLwISOVV@google.com>
Date: Tue, 25 May 2021 13:06:55 +0000
From: Quentin Perret <qperret@...gle.com>
To: Lukasz Luba <lukasz.luba@....com>
Cc: Vincent Donnefort <vincent.donnefort@....com>,
peterz@...radead.org, rjw@...ysocki.net, viresh.kumar@...aro.org,
vincent.guittot@...aro.org, linux-kernel@...r.kernel.org,
ionela.voinescu@....com, dietmar.eggemann@....com
Subject: Re: [PATCH v2 3/3] PM / EM: Skip inefficient OPPs
Hi Lukasz,
On Tuesday 25 May 2021 at 12:03:14 (+0100), Lukasz Luba wrote:
> That's a few more instructions to parse the 'flags' filed. I'm not sure
> if that brings speed improvements vs. if we not parse and have bool
> filed with a simple looping. The out-of-order core might even suffer
> from this parsing and loop index manipulations...
I'm not sure what you mean about parsing here? I'm basically suggesting
to do something along the lines of:
diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
index daaeccfb9d6e..f02de32d2325 100644
--- a/include/linux/energy_model.h
+++ b/include/linux/energy_model.h
@@ -128,13 +128,11 @@ struct em_perf_state *em_pd_get_efficient_state(struct em_perf_domain *pd,
for (i = 0; i < pd->nr_perf_states; i++) {
ps = &pd->table[i];
- if (ps->flags & EM_PERF_STATE_INEFFICIENT)
- continue;
if (ps->frequency >= freq)
break;
}
- return ps;
+ return &pd->table[ps->next_efficient_idx];
}
What would be wrong with that?
Thanks,
Quentin
Powered by blists - more mailing lists