[ovs-dev] [bonding 2/2] bonding: Balance bond slaves based on ratio.

Jesse Gross jesse at nicira.com
Wed Oct 21 15:41:27 UTC 2009

On 10/16/09 10:15 AM, "Ben Pfaff" <blp at nicira.com> wrote:

> Jesse Gross <jesse at nicira.com> writes:
>> Previously when deciding whether to migrate a hash between slaves
>> we would never move it if it would cause more load on the new slave
>> than the old.  This could lead to a situation where the slaves would
>> be imbalanced but no migration would occur since it would flip the
>> load.  This will do the migration if it will decrease the ratio.
> If you're confident about the invariants, then this looks OK to
> me.

All the tests are passing now, so I pushed it with the addition of a small
change to fix a segfault when updating the list of hashes assigned to a
slave.  This was a latent bug in a code path that the previous method of
balancing never exercised.  Thanks to Reid for helping reproduce and test
the issue!
> I think that, with some work, this code could be broken out into
> an independent file.  Then we could write some unit tests that
> make sure that it really does the right thing in various
> contrived situations.

Yeah, this is definitely important because there are a bunch of corner cases
that are hard to hit with real data but would be easy in unit tests.

More information about the dev mailing list