Skip to content

sched/psi: Optimize PSI iteration

Kairui Song cgroups lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched/psi: simplify cgroup psi retrievinginclude/linux/psi.h kernel/cgroup/cgroup.c+7 -22 replies
2/2sched/psi: iterate through cgroups directlyinclude/linux/psi_types.h kernel/sched/psi.c+34 -1410 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMichal KoutnýJohannes Weiner
1/2R-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] sched/psi: Optimize PSI iteration

Hi all,

Patch 1/2 simplify cgroup_psi, I didn't see a measurable performance change with this.

Patch 2/2 removed the cache, I just noticed it have the same hierarchy as the cgroup it's in, so I wondered if it worth adding a cache just for simplifying the branch, and if we can balance the branch simplification and minimize the memory footprint in another way, it seems this is doable.

After the two patches, I see a measurable performance gain using mmtests/perfpipe:

(AVG of 100 test, ops/sec, the higher the better)
KVM guest on a i7-9700:

        psi=0         root cgroup   5 levels of cgroup
Before: 59221         55352         47821
After:  60100         56036         50884

KVM guest on a Ryzen 9 5900HX:

        psi=0         root cgroup   5 levels of cgroup
Before: 144566        138919        128888
After:  145812        139580        133514

Kairui Song (2):
sched/psi: simplify cgroup psi retrieving
sched/psi: iterate through cgroups directly

 include/linux/psi.h       |  2 +-
 include/linux/psi_types.h |  1 -
 kernel/cgroup/cgroup.c    |  7 +++++-
 kernel/sched/psi.c        | 45 ++++++++++++++++++++++++++++-----------
 4 files changed, 39 insertions(+), 16 deletions(-)
Signature · 1 line
2.39.1