public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Kairui Song <ryncsn@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Chengming Zhou <zhouchengming@bytedance.com>,
	Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] sched/psi: iterate through cgroups directly
Date: Wed, 15 Feb 2023 19:25:48 +0100	[thread overview]
Message-ID: <20230215182547.GA17571@blackbody.suse.cz> (raw)
In-Reply-To: <CAMgjq7CKG_pNxm5ofciK-aBKwGuRCiyWPm1BXhjmcg=N0bfFcg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

On Thu, Feb 16, 2023 at 01:49:22AM +0800, Kairui Song <ryncsn@gmail.com> wrote:
> With rootcg:
> 55718.9 op/s (unpatched) compared to 55862.2 (patched)
> With 5 levels:
> 49975.5 op/s (unpatched) compared to 50778.5 op/s (patched)
> 
> Previous tests are a bit biased since I only run the test for 100 * 3
> times, or maybe it is sensitive to some random kernel structure
> changes.
> 
> But I ignored one important thing in my previous test, that the
> performance actually drops heavily with deeper levers of cgroups:
> With 8 levels:
> 48902.4 op/s (unpatched) compared to 47476.6 op/s (patched)
> With 50 levels of cgroup:
> 25605.7375 op/s (unpatched) compared to 20417.275 op/s (patched)

IIUC, one could also interpret this as the parent caching within
psi_group is effective especially with deep hierarchies.

I'd say practical hierarchies are below 10 levels deep. But yeah, the
averaged results aren't so impressive.

Thanks for sharing your insights,
Michal

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-02-15 18:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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ý [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230215182547.GA17571@blackbody.suse.cz \
    --to=mkoutny@suse.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ryncsn@gmail.com \
    --cc=surenb@google.com \
    --cc=tj@kernel.org \
    --cc=zhouchengming@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox