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

Timur Tabi timur.tabi at ammasso.com
Wed Sep 29 08:03:24 PDT 2004


Michael S. Tsirkin wrote:

> 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,

In my test code, I only grab one 4K page with get_user_pages(), so it's 
not like I'm stressing it out.

 > so the problem does not occur.
> I think its also mostly for send (hardware reads the buffer), not
> receive.

What difference does that make?  If the hardware is reading the buffer, 
the buffer better be there!  If a page of the buffer gets swapped out, 
then the hardware will read junk.

-- 
Timur Tabi
Staff Software Engineer
timur.tabi at ammasso.com



More information about the general mailing list