[ovs-dev] [PATCH 3/4] ofproto-dpif: Don't poll ports when nothing changes

Joe Stringer joestringer at nicira.com
Mon Nov 11 21:05:01 UTC 2013


Hmm, my clang environment wasn't quite up to scratch. Should have
better luck catching errors like that in the future.

I see that you merged the flap counter increment fix, thanks.

On 11 November 2013 08:26, Ben Pfaff <blp at nicira.com> wrote:
> On Fri, Nov 08, 2013 at 09:41:21AM -0800, Joe Stringer wrote:
>> Currently, as part of ofproto-dpif run() processing, we loop through all
>> ports and poll corresponding devices for changes in carrier, cfm and bfd
>> status. This allows us to determine how it may affect bundles. For the
>> average case where devices are not going up or down constantly, this is
>> a large amount of unnecessary processing.
>>
>> This patch gets the cfm, bfd and lacp modules to update the global
>> netdev change_seq when changes in port/device status occur. We can then
>> use this global change_seq to check if anything has changed before
>> looping through the ports in ofproto-dpif. In a test environment of 5000
>> internal ports and 50 tunnel ports with bfd, this reduces CPU usage from
>> about 35% to about 25%.
>>
>> Signed-off-by: Joe Stringer <joestringer at nicira.com>
>
> Clang says:
>
>     ../lib/netdev-vport.c:174:5: error: calling function 'netdev_vport_changed' requires exclusive lock on 'netdev->mutex' [-Werror,-Wthread-safety-analysis]
>         netdev_vport_changed(netdev);
>         ^
>
> I see that we still have the flap counter increment in cfm_run()
> conditional on whether we dropped a log message.  I hope that fix didn't
> get dropped; maybe it's in my inbox somewhere.
>
> Thanks,
>
> Ben.



More information about the dev mailing list