[openib-general] kernel VM monitor for memory registration caching

Gleb Natapov glebn at voltaire.com
Mon Aug 1 06:20:56 PDT 2005


On Mon, Aug 01, 2005 at 06:12:24AM -0700, Roland Dreier wrote:
>     Gleb>  First of all, you have one user_delta per mm that user can
>     Gleb> poll from userspace. Is it possible to make user_delta to be
>     Gleb> part of dreg_region instead of dreg_context and module will
>     Gleb> set it whenever registration becomes invalid. Field
>     Gleb> 'invalid' will be added to buf_info structure and pointer to
>     Gleb> it will be passed to kernel at registration time.  This way
>     Gleb> the userpace can look up cache and check if registration is
>     Gleb> still valid. No need to rescan cache from userspace, we
>     Gleb> already scanned it once from kernel after all. With your
>     Gleb> current approach userspace will need to search for mr_handle
>     Gleb> in the cache and invalidate the entry that holds it.
> 
> That idea sounds familiar ;)
Why? Is that what you had in mind?

> 
>     Gleb>  You change vma_ops in vma to catch open/close events. What
>     Gleb> about nopage() method in vma_ops? We have to forward it to
>     Gleb> original vma_ops?
> 
> Can nopage ever affect registered memory?  The registration process
> makes sure the pages are resident and pinned, so I don't see how a
> region's mapping could ever be changed by a call to a vma's nopage method.
> 
This was right for vapi modules since after mlock() vma boundaries was
aligned with registration boundaries, but this is not the case for
OpenIB (correct me if I am wrong here). Part of the vma can be pinned and thus 
be in memory but other parts may be swapped out.

--
			Gleb.



More information about the general mailing list