diff options
author | Benjamin LaHaise <bcrl@kvack.org> | 2009-01-10 23:00:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 23:05:33 -0500 |
commit | 7106a5ab89c50c6b5aadea0850b40323804a922d (patch) | |
tree | d4ce5df5ff89da035b6dd092bbe089757def7c34 /arch/x86/kernel/entry_64.S | |
parent | c59765042f53a79a7a65585042ff463b69cb248c (diff) |
x86-64: remove locked instruction from switch_to()
Impact: micro-optimization
The patch below removes an unnecessary locked instruction from
switch_to(). TIF_FORK is only ever set in copy_thread() on initial
process creation, and gets cleared during the first scheduling of the
process. As such, it is safe to use an unlocked test for the flag
within switch_to().
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index e28c7a987793..38dd37458e44 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -408,6 +408,8 @@ END(save_paranoid) | |||
408 | ENTRY(ret_from_fork) | 408 | ENTRY(ret_from_fork) |
409 | DEFAULT_FRAME | 409 | DEFAULT_FRAME |
410 | 410 | ||
411 | LOCK ; btr $TIF_FORK,TI_flags(%r8) | ||
412 | |||
411 | push kernel_eflags(%rip) | 413 | push kernel_eflags(%rip) |
412 | CFI_ADJUST_CFA_OFFSET 8 | 414 | CFI_ADJUST_CFA_OFFSET 8 |
413 | popf # reset kernel eflags | 415 | popf # reset kernel eflags |