Re: [PATCH bpf-next 1/4] cgroup, psi: Init PSI of root cgroup to psi_system

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

 



Hello,

On Fri, Dec 22, 2023 at 11:30:59AM +0000, Yafang Shao wrote:
> By initializing the root cgroup's psi field to psi_system, we can
> consistently obtain the psi information for all cgroups from the struct
> cgroup.
> 
> Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>
> ---
>  include/linux/psi.h    | 2 +-
>  kernel/cgroup/cgroup.c | 5 ++++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/psi.h b/include/linux/psi.h
> index e074587..8f2db51 100644
> --- a/include/linux/psi.h
> +++ b/include/linux/psi.h
> @@ -34,7 +34,7 @@ __poll_t psi_trigger_poll(void **trigger_ptr, struct file *file,
>  #ifdef CONFIG_CGROUPS
>  static inline struct psi_group *cgroup_psi(struct cgroup *cgrp)
>  {
> -	return cgroup_ino(cgrp) == 1 ? &psi_system : cgrp->psi;
> +	return cgrp->psi;
>  }

How have you tested this change? Looking at the code there are other
references to psi_system, e.g. to show it under /proc/pressure/* and to
exempt it from CPU FULL accounting. I don't see how the above change would
be sufficient.

Thanks.

-- 
tejun




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux