From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Alexander Schmidt
<alexs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: alexv-smomgflXvOZWk0Htik3J/w@public.gmane.org,
alexonlists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
of-ewg <ewg-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org>,
Linux RDMA <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Christoph Raisch <raisch-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Stefan Roscher
<stefan.roscher-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
Subject: Re: [ewg] [PATCH v2] libibverbs: ibv_fork_init() and libhugetlbfs
Date: Sat, 03 Jul 2010 13:19:07 -0700 [thread overview]
Message-ID: <adaoceonwsk.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <20100628171829.7749f145@alex-laptop> (Alexander Schmidt's message of "Mon, 28 Jun 2010 17:18:29 +0200")
> 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 <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-07-03 20:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 9:13 [PATCH v2] libibverbs: ibv_fork_init() and libhugetlbfs Alexander Schmidt
2010-06-02 21:49 ` Roland Dreier
[not found] ` <adamxvdqf4e.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-06-09 9:47 ` Alexander Schmidt
2010-06-09 18:09 ` Roland Dreier
[not found] ` <adamxv4m620.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-06-10 14:59 ` Alex Vainman
[not found] ` <4C10FDD0.8000108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-06-28 15:18 ` Alexander Schmidt
2010-07-03 20:19 ` Roland Dreier [this message]
[not found] ` <adaoceonwsk.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-07-06 15:25 ` [ewg] " Alexander Schmidt
2010-07-06 21:31 ` Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adaoceonwsk.fsf@roland-alpha.cisco.com \
--to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
--cc=alexonlists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=alexs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=alexv-smomgflXvOZWk0Htik3J/w@public.gmane.org \
--cc=ewg-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=raisch-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=stefan.roscher-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox