Comments answered inline.

Thanks,
Alin Balutoiu.

> -----Original Message-----
> From: Russell Bryant [mailto:[email protected]]
> Sent: Tuesday, August 22, 2017 2:35 PM
> To: Alin Balutoiu <[email protected]>
> Cc: [email protected]
> Subject: Re: [ovs-dev] [PATCH] windows, python: set the reset event to
> automatic
> 
> On Tue, Aug 22, 2017 at 6:47 AM, Alin Balutoiu
> <[email protected]> wrote:
> > The overlapped structures used for read and write operations get an
> > event with manual reset flag set on True.
> >
> > At the moment events are waiting to be reset with their state being
> > always signaled.
> 
> Just making sure I understand ... once an event was raised for a fd, it was
> never reset?  What was the side effect?  Did it turn the event loop into a
> busy loop?
[Alin Balutoiu] The side effect was observed in the OpenStack case when
using the native interface driver. Since the event was never reset, the
call to poller.block() always was returning the same event, even though
there was no read operation to be done. This resulted in having an infinite
loop consuming a lot of CPU.
> 
> > This commit sets from manual reset to automatic reset for the events
> > on the overlapped read/write structures.
> >
> > Signed-off-by: Alin Balutoiu <[email protected]>
> > ---
> >  python/ovs/stream.py | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/python/ovs/stream.py b/python/ovs/stream.py index
> > f82a449..b30c4aa 100644
> > --- a/python/ovs/stream.py
> > +++ b/python/ovs/stream.py
> > @@ -103,9 +103,11 @@ class Stream(object):
> >          self.pipe = pipe
> >          if sys.platform == 'win32':
> >              self._read = pywintypes.OVERLAPPED()
> > -            self._read.hEvent = winutils.get_new_event()
> > +            self._read.hEvent = winutils.get_new_event(bManualReset=False,
> > +
> > + bInitialState=False)
> >              self._write = pywintypes.OVERLAPPED()
> > -            self._write.hEvent = winutils.get_new_event()
> > +            self._write.hEvent = winutils.get_new_event(bManualReset=False,
> > +
> > + bInitialState=False)
> >              if pipe is not None:
> >                  # Flag to check if fd is a server HANDLE.  In the case of a
> >                  # server handle we have to issue a disconnect before
> > closing
> > --
> > 2.10.0.windows.1
> > _______________________________________________
> > dev mailing list
> > [email protected]
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 
> 
> 
> --
> Russell Bryant
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to