]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: optimize tlb_get_least_loaded_slave
authorJiri Pirko <jpirko@redhat.com>
Wed, 19 May 2010 03:26:39 +0000 (03:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Jun 2010 11:16:24 +0000 (04:16 -0700)
commit0525c7c21e461050d8b66bb2836cba9956d67a9d
tree61701eb46c49d0a2db449be87ae1d114e03ac9f7
parent6d62214d179a0094f5fd71bdcc79956c782e8709
bonding: optimize tlb_get_least_loaded_slave

In the worst case, when the first loop breaks an the end of the slave list,
the slave list is iterated through twice. This patch reduces this
function only to one loop. Also makes it simpler.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_alb.c