From: Tim Blechmann <tim@klingt.org>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [PATCH] sched, x86: Optimize branch hint in __switch_to()
Date: Sun, 29 Nov 2009 12:55:16 +0100 [thread overview]
Message-ID: <4B126124.60902@klingt.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 315 bytes --]
Branch hint profiling on my nehalem machine showed 89%
incorrect branch hints:
31032542 270070841 89 __switch_to process_64.c 440
Signed-off-by: Tim Blechmann <tim@klingt.org>
---
arch/x86/kernel/process_64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-sched-x86-Optimize-branch-hint-in-__switch_to.patch --]
[-- Type: text/x-patch; name="0001-sched-x86-Optimize-branch-hint-in-__switch_to.patch", Size: 591 bytes --]
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index c8d0ece..88068b3 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -437,7 +437,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
* reload when it has changed. When prev process used 64bit
* base always reload to avoid an information leak.
*/
- if (unlikely(fsindex | next->fsindex | prev->fs)) {
+ if (fsindex | next->fsindex | prev->fs) {
loadsegment(fs, next->fsindex);
/*
* Check if the user used a selector != 0; if yes
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
reply other threads:[~2009-11-29 11:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4B126124.60902@klingt.org \
--to=tim@klingt.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.