Skip to contentSkip to conversation

sched, x86: Optimize branch hint in __switch_to()

PATCH New Tim Blechmann 1 participant 1 message Nov 29, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched, x86: Optimize branch hint in __switch_to()

Branch hint profiling on my nehalem machine showed 89% incorrect branch hints:

31032542 270070841 89 __switch_to process_64.c 440

---
 arch/x86/kernel/process_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/process_64.c +1 -1
index c8d0ece..88068b3 100644
@@ -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