This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Memory Sharing

To: Lakshitha Harshan <harshan.dll@xxxxxxxxx>
Subject: Re: [Xen-devel] Memory Sharing
From: Jui-Hao Chiang <juihaochiang@xxxxxxxxx>
Date: Sun, 19 Jun 2011 19:34:59 -0400
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 19 Jun 2011 16:35:42 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Y4yOMJFpyR1Xz3UphCkU4QmgtbYVtIKOJQhN9WGYv+s=; b=UJGwQIbJeqRTQNIF8X8bSy2x/my7kvG3+bUjMgNrXYINNvNZMFggaxnyx33NsyePKb JJriws0SMUiqWxO30bRNimpuTxTizt6+Y+IkOhZvXkHD0oXIDF3qMnVsyfrG4kKDc3KJ 6MKb/cX4xYazkTm8oQfMeAjqsyDNuwy+iXIkI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=oQbGXtjLgSYhtuJVIOb4g5Dsh2OKOt53TJvdBRZf7HvFM2xMZvEEHqqF9uUbrTv7wf l3exkSEU+fVKjKkS+TuVOyNM6kA2DdNK0hauBsDY+SbiTfB0nhlo1/XYG+9V+v4rkYGt bqTmfdfokS6ZZhLtidH6chO9GFFOMbdxj9lLE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTin7Oef+ByF1but4HaQGWm0EZhN6+g@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BANLkTin7Oef+ByF1but4HaQGWm0EZhN6+g@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi, Harshan;

The share() in mem_sharing.c doesn't check if the content two pages
(handles) are the same. The function simply drop the 2nd one (client
handle), and that's why you got all VMs crash except the domU which is
used for getting the handles (shandles).
You have to use memcmp or some other way in share() function to make
sure they are actually the same.


On Thu, Jun 16, 2011 at 10:15 AM, Lakshitha Harshan
<harshan.dll@xxxxxxxxx> wrote:
> Hi,er
> I am playing with memory sharing functions (nominate & share), for my
> research project. In my project, i get the GFNs of starting & ending
> pages of kernel code segment using xc_translate_foreign_address and
> then using a loop i nominate the memory pages of kernel code segment &
> share them.
> Both nominate & share() functions returns 0, on most sharing requests
> (almost 99%).
> My problem is that after sharing the memory, all of the other domUs
> except the domU which is used for getting the handles (shandles) for
> sharing memory pages are frozen, if i start one VM after another and
> try to share code pages after VMs have logged in. If i try to run the
> same procedure on already started set of guest domains, the VMs will
> be restarted (except the shandle domU).
> So what could be the reason for this?
> I'm using Xen -4.1.1-rc3-pre.
> Thanks,
> Harshan
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>