[ofa-general] Memory registration redux

Jeff Squyres jsquyres at cisco.com
Mon May 18 09:24:48 PDT 2009


On May 7, 2009, at 5:58 PM, Roland Dreier (rdreier) wrote:

>  > Specifically: the actual dereg of 0x1000-0x3fff is blocked on also
>  > releasing 0x2000-0x2fff.
>
> If everyone is doing this, how do you handle the case that Jason  
> pointed
> out, namely:
>
>  * you register 0x1000 ... 0x3fff
>  * you want to register 0x2000 ... 0x2fff and have a cache hit
>  * you finish up with 0x1000 ... 0x3fff
>  * app does something (which is valid since you finished up with the
>    bigger range) that invalidates mapping 0x3000 ... 0x3fff (eg free()
>    that leads to munmap() or whatever), and your hooks tell you so.
>  * app reallocates a mapping in 0x3000 ... 0x3fff
>  * you want to re-register 0x1000 ... 0x3fff -- but it has to be  
> marked
>    both invalid and in-use in the cache at this point !?
>


Sorry; this mail slipped by me and I just saw it now.

If this can actually happen -- that the mapping of 0x1000 ... 0x3fff  
can change even though it is still registered, then we're screwed --  
we have no way of knowing that this is now invalid (Open MPI, at least  
-- can't speak for others).

Is there a way to detect condition this in userspace?

-- 
Jeff Squyres
Cisco Systems




More information about the general mailing list