Quoting r. Sean Hefty <[EMAIL PROTECTED]>: > Subject: Re: Re: [PATCH] [CMA] support loopback addresses > > Michael S. Tsirkin wrote: > >>+ INIT_WORK(work, loopback_addr_handler, id_priv); > >>+ queue_work(wq, work); > >>+ return 0; > >>+err: > >>+ kfree(work); > >>+ return ret; > >>+} > > > > I'm not following this: why are we deferring the work? > > Cant it be done directly? > > To keep rdma_resolve_addr() generic, it is an asynchronous call. The work > queue is used to callback the user from a separate thread other than the one > that they called down with. The ib_addr module does something similar when > the destination address is actually a local address, deferring the callback to > another thread.
Maybe this should be moved to ib_addr then? > > The alternative is to have the API behave one way for destination addresses > that > are local, versus those that are remote, but this complicates applications > that > are not aware if an address belongs to the local or a remote system. > > - Sean So, maybe we can reuse the ib_addr wq? Having all requests complete from a single thread could help applications, I think. -- MST _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
