On Wed, Apr 10, 2013 at 10:32 AM, Jesse Gross <je...@nicira.com> wrote:
> On Wed, Apr 10, 2013 at 9:01 AM, Jesse Gross <je...@nicira.com> wrote: > > On Tue, Apr 9, 2013 at 9:04 PM, Pravin Shelar <pshe...@nicira.com> > wrote: > >> On Tue, Apr 9, 2013 at 6:41 PM, Jesse Gross <je...@nicira.com> wrote: > >>> I think there is potentially another race condition here: if a > >>> notification comes after we retrieve the value of count but before we > >>> exit the workqueue. The counter will be incremented but another work > >>> instance won't be scheduled since one is already running. Essentially > >>> we're trying to emulate a semaphore here but actually doing that > >>> directly would require introducing a new thread, which I really don't > >>> want to do. > >>> > >> Pending flag is cleared before actual work execution is started. So I > think > >> this race is not possible. > > > > You're right, that's great. We should also double check that our > > compatibility code for workqueues is sufficient for everything we are > > trying to do. > > Actually, I think that this means that we don't need the counters at > all. If a port is deleted after we start iterating then we'll always > get another pass. I noticed a similar example of this in > net_namespace.c:__put_net(). > right, I will remove counter.
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev