From: Kent Overstreet Date: Thu, 22 Aug 2013 01:36:45 +0000 (-0700) Subject: bcache: Delete some slower inline asm X-Git-Tag: next-20130912~34^2~6^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=27698d6fbb5025c8a4427a7a50df9182dd5326b1;p=karo-tx-linux.git 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 --- diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index 6923be8db38c..3897a977428a 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; }