[ovs-dev] [PATCH 1/2] xenserver: Block until change in poll loop to avoid 100% CPU consumption.

Justin Pettit jpettit at nicira.com
Thu Aug 26 16:56:22 UTC 2010


Looks good.  Thanks!

--Justin


On Aug 26, 2010, at 9:47 AM, Ben Pfaff wrote:

> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> ..._share_openvswitch_scripts_monitor-external-ids |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/xenserver/usr_share_openvswitch_scripts_monitor-external-ids b/xenserver/usr_share_openvswitch_scripts_monitor-external-ids
> index 252b92f..28aaf78 100755
> --- a/xenserver/usr_share_openvswitch_scripts_monitor-external-ids
> +++ b/xenserver/usr_share_openvswitch_scripts_monitor-external-ids
> @@ -188,6 +188,9 @@ def main(argv):
>     interfaces = {}
>     while True:
>         if not idl.run():
> +            poller = ovs.poller.Poller()
> +            idl.wait(poller)
> +            poller.block()
>             continue
> 
>         new_bridges = {}
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list