[openib-general] Re: userspace event reporting

Michael S. Tsirkin mst at mellanox.co.il
Tue Jul 12 23:26:46 PDT 2005


Quoting r. Fab Tillier <ftillier at silverstorm.com>:
> Subject: RE: userspace event reporting
> 
> > From: Michael S. Tsirkin [mailto:mst at mellanox.co.il]
> > Sent: Tuesday, July 12, 2005 3:15 PM
> > 
> > Quoting r. Sean Hefty <sean.hefty at intel.com>:
> > >
> > > I believe that this is purely a userspace issue.  I can't see why
> > > using a mutex wouldn't work, but I believe that get_event() currently
> > > blocks waiting for an event.
> > >
> > > Note that get_event() may be reporting events associated with an
> > > object other than the one being destroyed.
> > 
> > Maybe, create a special kind of event after the object has been destroyed?
> 
> Adding such an event in effect makes destruction asynchronous - the user must
> wait until the destroy event before freeing their context.

I think you can make this part of destroy: this event simply
solves a deadlock where get_event is blocked so you cant destroy
an object.

destroy
take mutex
get_event(non blocking)
free mutex

-- 
MST



More information about the general mailing list