Thread (39 messages) 39 messages, 4 authors, 2d ago

Re: [PATCH net v2 06/14] net: pse-pd: check the PI state under the lock when setting a power limit

flat view

From: Kory Maincent <kory.maincent@bootlin.com>
Date: 2026-10-30 11:30:25
Also in: lkml


On 10/23/26 23:54, Carlo Szelinsky wrote:
On Fri, 23 Oct 2026 08:13:34 +0000, netdev-bot+sashiko@kernel.org wrote:
quoted
[Severity: High]
Do admin_state_enabled and isr_pd_detected really mean the PI is powered?
Kory, a question about pending PIs. A PI can be admin enabled with a
PD detected but without power: when there was not enough budget when
it was enabled or when the PD was detected, or when a PI with higher
priority took its budget. Such a PI passes the check in
pse_pi_update_pw_budget(), so setting a power limit reserves budget
for it if the limit fits. When the PI is powered later,
pse_pi_allocate_pw_budget_static_prio() sets pw_allocated_mW again,
and the budget reserved before is never freed.

This was the same before my patch. Should set_pw_limit skip a pending
PI, for example with pse_pi_is_admin_enable_pending()? If yes, I would
send that as a separate patch.
Sorry for the late reply.
No, I don't think we should skip setting power limit for a pending PI.
Lowering the power limit of a PI could allow this pending PI to be powered again with a smaller power budget.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help