>  When registering two memory regions A and B from within
 > the same huge page, we will end up with one node in the tree which covers the
 > whole huge page after registering A. When the second MR is registered, a node
 > is created with the MR size rounded to the system page size (as there is no
 > need to call madvise(), it is not noticed that MR B is part of a huge page).
 > 
 > Now if MR A is deregistered before MR B, I see that the tree containing
 > mem_nodes is empty afterwards, which causes problems for the deregistration 
 > of
 > MR B, leaving the tree in a corrupted state with negative refcounts. This 
 > also
 > breaks later registrations of other memory regions within this huge page.

Good thing I didn't get around to applying the patch yet ;)

I haven't thought this through fully, but it seems that maybe we could
extend the madvise tracking tree to keep track of the page size used for
each node in the tree.  Then for the registration of MR B above, we
would find the node for MR A covered MR B and we should be able to get
the ref counting right.

 - R.
-- 
Roland Dreier <rola...@cisco.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
_______________________________________________
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to