lkml.org 
[lkml]   [2023]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 07/18] PM: EM: Refactor struct em_perf_domain and add default_table
From


On 9/26/23 19:52, Rafael J. Wysocki wrote:
> On Mon, Sep 25, 2023 at 10:11 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>> The Energy Model is going to support runtime modifications. Refactor old
>> implementation which accessed struct em_perf_state and introduce
>> em_perf_domain::default_table to clean up the design. This new field
>> will help to better distinguish 2 performance state tables.
>>
>> Update all drivers or frameworks which used the old field:
>> em_perf_domain::table and now should use em_perf_domain::default_table.
>>
>> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>

[snip]

>> diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
>> index 8069f526c9d8..d236e08e80dc 100644
>> --- a/include/linux/energy_model.h
>> +++ b/include/linux/energy_model.h
>> @@ -36,9 +36,19 @@ struct em_perf_state {
>> */
>> #define EM_PERF_STATE_INEFFICIENT BIT(0)
>>
>> +/**
>> + * struct em_perf_table - Performance states table
>> + * @state: List of performance states, in ascending order
>> + * @rcu: RCU used for safe access and destruction
>> + */
>> +struct em_perf_table {
>> + struct em_perf_state *state;
>> + struct rcu_head rcu;
>
> There is no explanation of the role of this rcu_head in the changelog
> or anywhere in this patch.
>
> It is also not used as of this patch AFAICS.
>
> It would be better to add it when it actually gets used IMV.

That's a good point. I will introduce this 'rcu' field later.

\
 
 \ /
  Last update: 2023-09-29 10:46    [W:0.079 / U:3.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site