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]
Message-ID: <69eaaadf-a6b3-4a5a-af4a-5b574f9edad4@sirena.org.uk>
Date: Mon, 13 Jan 2025 14:11:16 +0000
From: Mark Brown <broonie@...nel.org>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Oleksij Rempel <o.rempel@...gutronix.de>, kernel@...gutronix.de
Subject: Re: [PATCH 1/2] regulator: Add support for power budget

On Mon, Jan 13, 2025 at 02:07:45PM +0100, Kory Maincent wrote:

> +	rdev->pw_available_mW -= pw_req;

...

> +	if (!of_property_read_u32(np, "regulator-power-budget-milliwatt", &pval))
> +		constraints->pw_budget_mW = pval;
> +

This is only tracking the currently free power budget which both
restricts what we can do for tracking things like mismatched or missing
frees and means there's less information for diagnostic tools.  I'd
prefer to keep track of how much is in use and check against the budget
when trying to increase it, allowing us to check for releasing more
budget than was requested.

There's also an interaction with hardware with support for enforcing
power limits, either via alarms or by actually limiting.  Current
limiting/warning support is reasonably common, we should probably be
joining it up with the power limiting.  It's fortunately not used
dynamically by anything at the minute so we could just remove that API
and replace it by a power one, given that nobody uses it and there do
appear to be users for the power based API.  We do have some things that
set current limits in constraints IIRC.

We probably also need something explicit about how we handle baseline
load from things like passive components, the assumption probably needs
to be that it's negligable.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ