[openib-general] Question about pinning memory
Gleb Natapov
glebn at voltaire.com
Wed Jul 27 07:01:50 PDT 2005
On Wed, Jul 27, 2005 at 09:52:02AM -0400, Pete Wyckoff wrote:
> glebn at voltaire.com wrote on Wed, 27 Jul 2005 10:02 +0300:
> > Then we understand Pete differently. This is what he wrote in his first
> > email on the subject:
> > The MPI library essentially makes a system call before
> > reusing a cached memory registration to verify it is still valid.
> > How "the MPI library just checks the queue of VM events" without system
> > call? Do you mean kernel dumps events in some preallocated memory in
> > user process address space?
>
> Roland has it right. In response to your comments I refined the
> mechanism to avoid the system call: the kernel writes an event
> count to a registered userspace integer when something changes.
>
Excellent.
> > Of cause it is possible. It seems you misunderstand me. What is not
> > possible is that this happens between malloc() and free() for pinned
> > memory. After user does free() on a chunk of pinned memory we do not
> > unpin memory till libc returns this memory to the kernel via
> > munmap()/sbrk() system calls. Again this is what I already wrote.
> >
> > The solution that I what to see is this:
> > 1) Program knows somehow (without system call) that vma list changes.
> > 2) Program fetch new vma list (possibly by using system call).
> > 3) Program unregister cached entries that are no longer in virtual address
> > space.
>
> This is what I did. I'll just clean up the code and post it so you
> can read it yourself.
>
I'll wait for the code then.
--
Gleb.
More information about the general
mailing list