[ovs-dev] [PATCH 4/4] daemon-windows: Add users for windows services.

Ben Pfaff blp at nicira.com
Thu Jan 23 19:26:10 UTC 2014


On Thu, Jan 23, 2014 at 10:29:17AM -0800, Gurucharan Shetty wrote:
> On Fri, Jan 17, 2014 at 1:37 PM, Ben Pfaff <blp at nicira.com> wrote:
> > On Fri, Jan 17, 2014 at 01:30:27PM -0800, Gurucharan Shetty wrote:
> >> On Fri, Jan 17, 2014 at 1:13 PM, Ben Pfaff <blp at nicira.com> wrote:
> >> > On Fri, Jan 17, 2014 at 12:26:23PM -0800, Gurucharan Shetty wrote:
> >> >> Start with ovs-vswitchd and ovsdb-server.
> >> >>
> >> >> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
> >> >
> >> > Will poll_block() wake up if a service stop has been requested?
> >> > Ideally, it would.
> >> I did not think a lot about it. I suppose we have a time limit in ms
> >> after which we wake up every time correct?
> >
> > No.  In ovs-vswitchd, for example, if nothing is happening, and no
> > bridges are configured, then poll_block() can block indefinitely.
> 
> Okay.
> >
> >> I haven't seen (during my tests) a negative consequence of a small
> >> delay in stopping the service after a request. If that is indeed a
> >> problem, I will investigate more.
> >
> > I assume a small delay is OK, too, but I don't think that the delay
> > here is bounded.
> >
> I see that now. I think the following incremental that uses a
> CreateEvent and SetEvent in daemon-windows.c (on top of patch3 of the
> series) will fix the problem. The patch makes an assumption that
> poll_block() will only be called at one place in the main thread's
> loop. Otherwise, between two poll_block(), I will have to figure out a
> way to call a poll_fd_wait() to re-register a event. Is my assumption
> correct?

I think that it is correct, because we always strive to avoid blocking
at all.  But even if it is wrong, any blocking should be brief,
because otherwise we would have noticed it and fixed it earlier.

I don't know Windows well enough to spot pitfalls in what you wrote.
It looks OK to me in outline.



More information about the dev mailing list