Skip to content

Commit

Permalink
Revert "sched, x86: Optimize branch hint in __switch_to()"
Browse files Browse the repository at this point in the history
This reverts commit a3a1de0.

Commit 8ec6993 cleared the es
and ds selectors, so the original branch hints are correct now.
Therefore the branch hint doesn't need to be removed.

Signed-off-by: Tim Blechmann <tim@klingt.org>
LKML-Reference: <4B16503A.8030508@klingt.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Tim Blechmann authored and Ingo Molnar committed Dec 2, 2009
1 parent bdddd29 commit be8147e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,11 @@ __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 (next->es | prev->es)
if (unlikely(next->es | prev->es))
loadsegment(es, next->es);

savesegment(ds, prev->ds);
if (next->ds | prev->ds)
if (unlikely(next->ds | prev->ds))
loadsegment(ds, next->ds);


Expand Down

0 comments on commit be8147e

Please sign in to comment.