summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-08-21 18:36:45 -0700
committerKent Overstreet <kmo@daterainc.com>2013-10-03 15:22:41 -0700
commitfe4e017b1dec0abf1f1417972858f12ae88ff7b4 (patch)
tree17bf8ab0be36f6f382119b3cefbcfc8fa88134f9
parent17e1ff0be812dd1fa52053edfe3c88dbcef4aeba (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.c8
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)
static inline uint64_t shrd128(uint64_t high, uint64_t low, uint8_t shift)
{
-#ifdef CONFIG_X86_64
- asm("shrd %[shift],%[high],%[low]"
- : [low] "+Rm" (low)
- : [high] "R" (high),
- [shift] "ci" (shift)
- : "cc");
-#else
low >>= shift;
low |= (high << 1) << (63U - shift);
-#endif
return low;
}