I think it is dangerous to have a lock across all device drivers as one
blocking device can starve the rest of the devices.  I think that there
needs to be per device locking.  I would not fear this granular
locking.  It is fairly straight forward to make it work.

Cheers,
Dan

--- Alexander Chemeris <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> > This approach also means that there is no need to make a public
> method
> > for the device driver to invoke on the manager (the manager will
> invoke
> > a method on the device to push the frame).  There is still locking
> > required on the manager and connection.  However this can be made
> > fairly granular to avoid cross device blocking using the following
> > approach:
> >   take lock on the manager
> >     take the lock on the connection/device,
> >   release the manager lock
> >     invoke the frame push to the driver
> >   take lock on the manager
> >     release the lock on the connection/device,
> >   release the manager lock
> 
> I thought about solution, similar to Jaroslav suggested:
> 
>    take lock on the manager
>      take the lock on the connection/device,
>    release the manager lock
>        invoke the frame push to the driver
>      release the lock on the connection/device,
> 
> I think it would be enough for dispatching requests to different
> connections, but we should enforce all methods, operating on
> connections to take lock on them.
> 
> The other thought is to give up on this fine grained blocking at all.
> I think all operations on audio device could be done in non-blocking
> way,
> so it is safe to made them inside global lock. But this approach does
> not scale well to multi-processor systems. Should we really bother
> about
> this now?
> 
> 
> -- 
> Regards,
> Alexander Chemeris.
> 
> SIPez LLC.
> SIP VoIP, IM and Presence Consulting
> http://www.SIPez.com
> tel: +1 (617) 273-4000
> 

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to