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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0id8ZF+8Q9vaBZfXXhwyiZzbX0NWz0t+4iYTWLo7-X5KA@mail.gmail.com>
Date: Thu, 6 Mar 2025 11:37:46 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Lukasz Luba <lukasz.luba@....com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, LKML <linux-kernel@...r.kernel.org>, 
	Linux PM <linux-pm@...r.kernel.org>, Dietmar Eggemann <dietmar.eggemann@....com>, 
	Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Subject: Re: [PATCH v1 2/3] PM: EM: Make three functions static

On Thu, Mar 6, 2025 at 11:01 AM Lukasz Luba <lukasz.luba@....com> wrote:
>
> Hi Rafael,
>
> On 3/5/25 21:11, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > Three functions in the Energy Model code, em_dev_update_perf_domain(),
> > em_table_alloc() and em_table_free(), have no users outside that code and
> > so make them static, remove their headers from the Energy Model header
> > file and remove a piece of documentation associated with them.
> >
> > This also helps to clean up RCU handling in the Energy Model code that
> > will be done subsequently.
> >
> > No intentional functional impact.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > ---
> >
> > This essentially follow the rules that all functions without users in the
> > files where they are defined should be static (with all due respect to any
> > out-of-the-tree users of them).
> >
> > This change can be reversed when any new users of these functions appear,
> > but it will have to take changes made by the subsequent patch into account.
> >
>
> I see your point and it's valid.
>
> Although, please give me a few days and I will send some patches which
> add a client for this API. It will be a modification of the EM for
> CPUs while the GPU is producing heat to the SoC. Then IPA and EAS
> will get the updated total power values (doe to this this leakage power)
> in the EM.

OK, so I'll need to change the headers in the next patch and I'll drop this one.

> As of now, I had some code downstream for research, that I share with
> partners in the Android world [1].
> I believe the user-space sysfs (like in that top patch) which allows
> such EM modification would not be accepted?

Well, if there's a good enough reason for its existence, then it can
be added I think.  It all depends on how this is expected to be used.

> Such approach might also help the Middle-ware in the OS to influence the
> kernel decisions, mainly on phones, where the app just occupies the
> screen and Middle-ware knows about it.

You need to be cautious about changing the EM too often though as that
would only lead to thrashing and nothing beneficial.

> [1]
> https://gitlab.arm.com/linux-arm/linux-power/-/commits/dynamic_energy_model/android14-v6.1/v6.1.75/?ref_type=heads

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ