]> git.baikalelectronics.ru Git - kernel.git/commit
vmbus: replace modulus operation with subtraction
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 12 Feb 2017 06:02:25 +0000 (23:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2017 18:20:35 +0000 (10:20 -0800)
commitd7dbd2efdb611f2b638249a2f2cce65ea1ed693d
tree6e4b09719c1c7f88285fdd80ed5ea342253bf4de
parente73b5e90647612fbbc5f439376ea09820b457129
vmbus: replace modulus operation with subtraction

Takes less clock cycles to check for ring wrap and subtract than to
do a modulus instruction.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/ring_buffer.c