Re: [PATCH v6 3/4] sched, psi: Don't account irq time if sched_clock_irqtime is disabled
From: Michal Koutný
Date: Wed Dec 11 2024 - 08:56:51 EST
On Wed, Dec 11, 2024 at 09:17:28PM GMT, Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
> @@ -1286,7 +1286,7 @@ struct psi_trigger *psi_trigger_create(struct psi_group *group, char *buf,
> bool privileged;
> u32 window_us;
>
> - if (static_branch_likely(&psi_disabled))
> + if (static_branch_likely(&psi_disabled) || !irqtime_enabled())
> return ERR_PTR(-EOPNOTSUPP);
Beware this jumps out for _any_ PSI metric when only irq is disabled.
I meant to add a guard to psi_show() (this is psi_trigger_create()).
Michal
Attachment:
signature.asc
Description: PGP signature