aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2009-11-24 05:55:15 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-24 06:20:04 -0500
commita3a1de0c34de6f5f8332cd6151c46af7813c0fcb (patch)
tree2eaff67aaf2e0c841b26054b48e2a632db211c40
parent710390d90f143a9ebb87a475215140f426792efd (diff)
sched, x86: Optimize branch hint in __switch_to()
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 <tim@klingt.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <4B0BBB93.3080307@klingt.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/process_64.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index ad535b683170..d9db1049e86f 100644
--- 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)
406 * This won't pick up thread selector changes, but I guess that is ok. 406 * This won't pick up thread selector changes, but I guess that is ok.
407 */ 407 */
408 savesegment(es, prev->es); 408 savesegment(es, prev->es);
409 if (unlikely(next->es | prev->es)) 409 if (next->es | prev->es)
410 loadsegment(es, next->es); 410 loadsegment(es, next->es);
411
412 savesegment(ds, prev->ds); 411 savesegment(ds, prev->ds);
413 if (unlikely(next->ds | prev->ds)) 412 if (next->ds | prev->ds)
414 loadsegment(ds, next->ds); 413 loadsegment(ds, next->ds);
415 414
416 415