diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-08-21 21:36:45 -0400 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 00:56:42 -0500 |
commit | 098fb25498214069e6bbf908515f2952dd7654d0 (patch) | |
tree | f170596e7abb95f78a6b89044945aaea81919214 | |
parent | 28935ab5163c49ca5c199d67335e5e3c72c50853 (diff) |
bcache: Delete some slower inline asm
Never saw a profile of bset_search_tree() where it wasn't bottlenecked
on memory until I got my new Haswell machine, but when I tried it there
it was suddenly burning 20% of the cpu in the inner loop on shrd...
Turns out, the version of shrd that takes 64 bit operands has a 9 cycle
latency. hah.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
-rw-r--r-- | drivers/md/bcache/bset.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index 14573391206b..7d388b8bb50e 100644 --- a/drivers/md/bcache/bset.c +++ b/drivers/md/bcache/bset.c | |||
@@ -481,16 +481,8 @@ static struct bkey *table_to_bkey(struct bset_tree *t, unsigned cacheline) | |||
481 | 481 | ||
482 | static inline uint64_t shrd128(uint64_t high, uint64_t low, uint8_t shift) | 482 | static inline uint64_t shrd128(uint64_t high, uint64_t low, uint8_t shift) |
483 | { | 483 | { |
484 | #ifdef CONFIG_X86_64 | ||
485 | asm("shrd %[shift],%[high],%[low]" | ||
486 | : [low] "+Rm" (low) | ||
487 | : [high] "R" (high), | ||
488 | [shift] "ci" (shift) | ||
489 | : "cc"); | ||
490 | #else | ||
491 | low >>= shift; | 484 | low >>= shift; |
492 | low |= (high << 1) << (63U - shift); | 485 | low |= (high << 1) << (63U - shift); |
493 | #endif | ||
494 | return low; | 486 | return low; |
495 | } | 487 | } |
496 | 488 | ||