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

Michael S. Tsirkin mst at mellanox.co.il
Sun May 8 05:59:43 PDT 2005


Quoting r. Libor Michalek <libor at topspin.com>:
> Subject: Re: [PATCH] sdp: replace mlock with get_user_pages
> 
> On Thu, May 05, 2005 at 02:01:58PM +0300, Michael S. Tsirkin wrote:
> > Hello, Libor!
> > The following patch replaces the mlock hack with call
> > to get_user_pages. Since the application could have forked
> > while an iocb is outstanding, when an iocb is done
> > I do get_user_pages for a second time and copy data if
> > the physical address has changed.
> > 
> > Thus, changing ulimit is no longer required to get aio
> > working, processes are also allowed to fork and to call mlock/munlock
> > on the buffer.
> > 
> > Tested by the ttcp.aio benchmark, and works fine for me.
> 
>   In the latest kernel what happens to a page that's held
> with a get_user_page reference on fork? Which is the only
> case left.

I looked in fork.c and I dont see anything related to outstanding
aios in the fork flow. Do you?

-- 
MST - Michael S. Tsirkin



More information about the general mailing list