Re: [PATCH v6 3/4] sched, psi: Don't account irq time if sched_clock_irqtime is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 11, 2024 at 10:07:41PM GMT, Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
> My apologies, I'll fix it in the next version. How about the following
> change instead?
> 
> diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
> index 7341d33d9118..263c26a36511 100644
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -1233,6 +1233,9 @@ int psi_show(struct seq_file *m, struct
> psi_group *group, enum psi_res res)
>         if (static_branch_likely(&psi_disabled))
>                 return -EOPNOTSUPP;
> 
> +       if (!irqtime_enabled() && res == PSI_IRQ)
> +               return -EOPNOTSUPP;
> +
>         /* Update averages before reporting them */
>         mutex_lock(&group->avgs_lock);
>         now = sched_clock();

That looks correct.

Michal

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux