public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Schmidt <alexs-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: alexv-smomgflXvOZWk0Htik3J/w@public.gmane.org
Cc: alexonlists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	Stefan Roscher
	<stefan.roscher-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
	Christoph Raisch <raisch-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
	of-ewg <ewg-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org>,
	Linux RDMA <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2] libibverbs: ibv_fork_init() and libhugetlbfs
Date: Mon, 28 Jun 2010 17:18:29 +0200	[thread overview]
Message-ID: <20100628171829.7749f145@alex-laptop> (raw)
In-Reply-To: <4C10FDD0.8000108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Thu, 10 Jun 2010 17:59:28 +0300
Alex Vainman <alexonlists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Wrote Roland Dreier:
> > Thanks, nice work.  I like this approach.  Alex (Vainman) any comments
> > on this?
> > 
> >  - R.
> 
> The solution looks great.

Hi all,

in our further testing, we noticed that there is a substantial problem with
the current solution. Depending on the order of memory registrations, we might
end up with a corrupted node tree which blocks regions from being registered.

 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.

At the moment I do not see an obvious solution for this, but it's clear that
an overhaul of this code is needed. I'm writing this to make sure that there
won't be a release of libibverbs containing this incomplete code, but also
to ask for comments from other people who might have an idea on how to fix
this.

Thanks for any comments!

Alex
--
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

  parent reply	other threads:[~2010-06-28 15:18 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 [this message]
2010-07-03 20:19                 ` [ewg] " Roland Dreier
     [not found]                   ` <adaoceonwsk.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-07-06 15:25                     ` 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=20100628171829.7749f145@alex-laptop \
    --to=alexs-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=alexonlists-Re5JQEeQqe8AvxtiuMwx3w@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=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@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