[openib-general] get_user_pages() vs. sys_mlock() and 2.6 kernel

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 29 02:46:29 PDT 2004


Hello!
Quoting r. Timur Tabi (timur.tabi at ammasso.com) "Re: [openib-general] get_user_pages() vs. sys_mlock() and 2.6 kernel":
> Libor Michalek wrote:
> 
> >  I've seen the problem in test cases, so it definetly can happen in 2.4.
> >Looking at the 2.6 code the problem appears to be fixed, but I have not
> >had a chance to run tests to verify it. Good place to take look if you 
> >are interested is in launder_page() and try_to_unmap() in the kernel.
>
> ...
>
> I don't understand how this bug can continue to exist after all this 
> time.  get_user_pages() is supposed to lock the memory, because drivers 
> use it for DMA'ing directly into user memory.
> 

I think the reason is that linux currently supports zero-copy only for
a very limited number of situations, not
for a generic user-given memory buffer, so the problem does not occur.
I think its also mostly for send (hardware reads the buffer), not
receive.

MST



More information about the general mailing list