[openib-general] Re: Re: madvise MADV_DONTFORK/MADV_DOFORK

Michael S. Tsirkin mst at mellanox.co.il
Wed Feb 15 01:02:50 PST 2006


Clarification: as I see it, longer term we want to add a flag to make
get_user_pages trigger an immediate page copy on fork (rather than copy_ptes).
In this setup, MADV_DONTFORK will be used to speed up fork for an application
that has locked a big portion of its address space. With this in mind:

Quoting r. Gleb Natapov <glebn at voltaire.com>:
> > > Should call to madvise be the part of reg_mr call?
> > 
> > Probably no - MPI should have to do it.
uDAPL as well, I guess.

> Then each userspace app will have to reinvent the wheel.
I thought applications used MPI?

> Remember that we should gracefully handle overlapping registrations.
Right, and madvise doesnt do any refcouting. That's one reason not to include it
in reg_mr. Another is that madvise only works for full pages.

Applications should be aware of these limitations, and I think the easiest way
to achieve this is by asking them to use madvise directly.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list