From: Peter Zijlstra <peterz@infradead.org>
To: Shakeel Butt <shakeelb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] psi: reduce calls to sched_clock() in psi
Date: Mon, 22 Mar 2021 08:45:12 +0100 [thread overview]
Message-ID: <YFhLCPzKlE2uk46k@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210321205156.4186483-1-shakeelb@google.com>
On Sun, Mar 21, 2021 at 01:51:56PM -0700, Shakeel Butt wrote:
> We noticed that the cost of psi increases with the increase in the
> levels of the cgroups. Particularly the cost of cpu_clock() sticks out
> as the kernel calls it multiple times as it traverses up the cgroup
> tree. This patch reduces the calls to cpu_clock().
>
> Performed perf bench on Intel Broadwell with 3 levels of cgroup.
>
> Before the patch:
>
> $ perf bench sched all
> # Running sched/messaging benchmark...
> # 20 sender and receiver processes per group
> # 10 groups == 400 processes run
>
> Total time: 0.747 [sec]
>
> # Running sched/pipe benchmark...
> # Executed 1000000 pipe operations between two processes
>
> Total time: 3.516 [sec]
>
> 3.516689 usecs/op
> 284358 ops/sec
>
> After the patch:
>
> $ perf bench sched all
> # Running sched/messaging benchmark...
> # 20 sender and receiver processes per group
> # 10 groups == 400 processes run
>
> Total time: 0.640 [sec]
>
> # Running sched/pipe benchmark...
> # Executed 1000000 pipe operations between two processes
>
> Total time: 3.329 [sec]
>
> 3.329820 usecs/op
> 300316 ops/sec
>
> Signed-off-by: Shakeel Butt <shakeelb@google.com>
Thanks!
next prev parent reply other threads:[~2021-03-22 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-21 20:51 [PATCH] psi: reduce calls to sched_clock() in psi Shakeel Butt
2021-03-22 7:45 ` Peter Zijlstra [this message]
2021-03-22 14:19 ` Johannes Weiner
2021-03-23 15:08 ` [tip: sched/core] psi: Reduce " tip-bot2 for Shakeel Butt
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=YFhLCPzKlE2uk46k@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=shakeelb@google.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;
as well as URLs for NNTP newsgroup(s).