[openib-general] Re: Re: [PATCH] (repost) sdp: replace mlock with get_user_pages

Libor Michalek libor at topspin.com
Tue May 17 13:58:37 PDT 2005


On Sat, May 14, 2005 at 10:19:30PM +0300, Michael S. Tsirkin wrote:
> Quoting r. Libor Michalek <libor at topspin.com>:
> > 
> > > > Another alternative would be to always complete aios asynchronously,
> > > > which should preserve the order.  I guess this would hurt latency for
> > > > small ios...
> > > 
> > > To avoid hurting latency, lets count the number of outstanding
> > > asynchronous AIOs, and if there are asynchronous AIOs complete
> > > all of them asynchronously.
> > > 
> > > Does this make sense?
> > 
> >   Yes, except that the current iocb code does not reference individual
> > sockets anywhere, and do_iocb_complete would have to be the function
> > which decremented the per connection counter of outstanding AIOs.
> 
> But do_iocb_complete is always called with socket locked, is it not?
> If so its not hard to add that counting.

  iocb_complete() is always called with the socket locked, but by the
time do_iocb_complete() executes it's unknown what the socket is doing
since it's not referenced anywhere in sdp_iocb.

-Libor



More information about the general mailing list