public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sched/psi: Optimize PSI iteration
@ 2023-02-08 16:16 Kairui Song
       [not found] ` <20230208161654.99556-1-ryncsn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Kairui Song @ 2023-02-08 16:16 UTC (permalink / raw)
  To: Johannes Weiner, Suren Baghdasaryan
  Cc: Chengming Zhou, Michal Koutný, Tejun Heo, Ingo Molnar,
	Peter Zijlstra, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Kairui Song

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(-)

-- 
2.39.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-02-15 18:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 16:16 [PATCH 0/2] sched/psi: Optimize PSI iteration Kairui Song
     [not found] ` <20230208161654.99556-1-ryncsn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-02-08 16:16   ` [PATCH 1/2] sched/psi: simplify cgroup psi retrieving Kairui Song
2023-02-08 17:17     ` Michal Koutný
     [not found]     ` <20230208161654.99556-2-ryncsn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-02-08 18:54       ` Johannes Weiner
2023-02-08 16:16   ` [PATCH 2/2] sched/psi: iterate through cgroups directly Kairui Song
     [not found]     ` <20230208161654.99556-3-ryncsn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-02-08 17:29       ` Michal Koutný
2023-02-08 19:20         ` Johannes Weiner
     [not found]           ` <Y+P17OVZZWVpYIb0-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2023-02-08 21:57             ` Michal Koutný
2023-02-09 16:08             ` Kairui Song
     [not found]               ` <CAMgjq7Bem+8g8A_OR26PHhYYx-A7LHHO3tyQNR_tMnaaKNxkug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-02-15 17:49                 ` Kairui Song
2023-02-15 18:25                   ` Michal Koutný
2023-02-08 19:15       ` Johannes Weiner
2023-02-08 22:03         ` Michal Koutný
2023-02-09 15:30           ` Kairui Song
     [not found]         ` <Y+P0wLTdZcOPiKPZ-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2023-02-09 15:32           ` Kairui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox