projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
710390d
)
sched, x86: Optimize branch hint in __switch_to()
author
Tim Blechmann
<
[email protected]
>
Tue, 24 Nov 2009 10:55:15 +0000
(11:55 +0100)
committer
Ingo Molnar
<
[email protected]
>
Tue, 24 Nov 2009 11:20:04 +0000
(12:20 +0100)
Branch hint profiling on my nehalem machine showed 96%
incorrect branch hints:
6548732
174664120
96 __switch_to process_64.c
406
6548745
174565593
96 __switch_to process_64.c
410
Signed-off-by: Tim Blechmann <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Mike Galbraith <
[email protected]
>
Cc: Paul Mackerras <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
LKML-Reference: <
4B0BBB93
.
3080307
@klingt.org>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/process_64.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/process_64.c
b/arch/x86/kernel/process_64.c
index ad535b6831700bfdac237942d22f4380dbb43417..d9db1049e86fc91b6b100d33ff8c6ae3586592c4 100644
(file)
--- a/
arch/x86/kernel/process_64.c
+++ b/
arch/x86/kernel/process_64.c
@@
-406,11
+406,10
@@
__switch_to(struct task_struct *prev_p, struct task_struct *next_p)
* This won't pick up thread selector changes, but I guess that is ok.
*/
savesegment(es, prev->es);
- if (
unlikely(next->es | prev->es)
)
+ if (
next->es | prev->es
)
loadsegment(es, next->es);
-
savesegment(ds, prev->ds);
- if (
unlikely(next->ds | prev->ds)
)
+ if (
next->ds | prev->ds
)
loadsegment(ds, next->ds);