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]
Date:   Wed, 2 Mar 2022 07:01:35 +0000
From:   Lukasz Luba <lukasz.luba@....com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     linux-kernel@...r.kernel.org, dietmar.eggemann@....com,
        rafael@...nel.org, daniel.lezcano@...aro.org, nm@...com,
        sboyd@...nel.org, mka@...omium.org, dianders@...omium.org,
        robh+dt@...nel.org, devicetree@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v4 3/4] OPP: Add support of "opp-microwatt" for advanced
 EM registration



On 3/2/22 04:53, Viresh Kumar wrote:
> On 01-03-22, 09:35, Lukasz Luba wrote:
>> The Energy Model (EM) can be created based on DT entry:
>> 'dynamic-power-coefficient'. It's a 'simple' EM which is limited to the
>> dynamic power. It has to fit into the math formula which requires also
>> information about voltage. Some of the platforms don't expose voltage
>> information, thus it's not possible to use EM registration using DT.
>>
>> This patch aims to fix it. It introduces new implementation of the EM
>> registration callback. The new mechanism relies on the new OPP feature
>> allowing to get power (which is coming from "opp-microwatt" DT property)
>> expressed in micro-Watts.
>>
>> The patch also opens new opportunity to better support platforms, which
>> have a decent static power. It allows to register 'advanced' EM (based
>> on real power measurements) which models total power (static + dynamic),
>> so better reflects real HW.
> 
> Advanced :(
> 

You're right, here these words sneak in. I'm going to resent this patch
because it has this reported build issue for !EM. I'll update the words
there as well.

BTW, for the build fix, I'm going for the v3 approach:

------------8<--------------
         if (_of_has_opp_microwatt_property(dev)) {
                 struct em_data_callback em_cb_dt = 
EM_DATA_CB(_get_dt_power);

                 return em_dev_register_perf_domain(dev, nr_opp, &em_cb_dt,
                                                    cpus, true);
         }

----------->8---------------

I don't want to introduce another dual-macro mechanism, since
the type em_data_callback is not defined in !EM.

I hope you are OK with this approach, if not please let me know.

Powered by blists - more mailing lists