From: Peter Zijlstra <peterz@infradead.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: add unlikey branch hints to several system calls
Date: Wed, 19 Feb 2025 15:37:04 +0100 [thread overview]
Message-ID: <20250219143704.GF34567@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250219142423.45516-1-colin.i.king@gmail.com>
On Wed, Feb 19, 2025 at 02:24:23PM +0000, Colin Ian King wrote:
> Adding an unlikely() hint on early error return paths improves the
> run-time performance of several sched related system calls.
>
> Benchmarking on an i9-12900 shows the following per system call
> performance improvements:
>
> before after improvement
> sched_getattr 182.4ns 170.6ns ~6.5%
> sched_setattr 284.3ns 267.6ns ~5.9%
> sched_getparam 161.6ns 148.1ns ~8.4%
> sched_setparam 1265.4ns 1227.6ns ~3.0%
> sched_getscheduler 129.4ns 118.2ns ~8.7%
> sched_setscheduler 1237.3ns 1216.7ns ~1.7%
>
> Results are based on running 20 tests with turbo disabled (to reduce
> clock freq turbo changes), with 10 second run per test based on the
> number of system calls per second. The % standard deviation of the
> measurements for the 20 tests was 0.05% to 0.40%, so the results are
> reliable.
>
> Tested on kernel build with gcc 14.2.1
Nice, thanks!
next prev parent reply other threads:[~2025-02-19 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 14:24 Colin Ian King
2025-02-19 14:37 ` Peter Zijlstra [this message]
2025-02-21 19:29 ` [tip: sched/core] sched: Add " tip-bot2 for Colin Ian King
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=20250219143704.GF34567@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=colin.i.king@gmail.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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
all inboxes | Powered by JetHome®