diff options
author | Peter Zijlstra <peterz@infradead.org> | 2013-09-11 13:19:24 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-09-25 11:53:08 (GMT) |
commit | 0c44c2d0f459cd7e275242b72f500137c4fa834d (patch) | |
tree | fdd16d5585a986cf8cbed140f533d08d152bbc4f /kernel/sched | |
parent | 4314895165623879937f46d767673654662b570c (diff) | |
download | linux-0c44c2d0f459cd7e275242b72f500137c4fa834d.tar.xz |
x86: Use asm goto to implement better modify_and_test() functions
Linus suggested using asm goto to get rid of the typical SETcc + TEST
instruction pair -- which also clobbers an extra register -- for our
typical modify_and_test() functions.
Because asm goto doesn't allow output fields it has to include an
unconditinal memory clobber when it changes a memory variable to force
a reload.
Luckily all atomic ops already imply a compiler barrier to go along
with their memory barrier semantics.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-0mtn9siwbeo1d33bap1422se@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
0 files changed, 0 insertions, 0 deletions