[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare


  • To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
  • From: Jui-Hao Chiang <juihaochiang@xxxxxxxxx>
  • Date: Mon, 10 Jan 2011 12:58:31 +0800
  • Cc: tinnycloud <tinnycloud@xxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Sun, 09 Jan 2011 20:59:34 -0800
  • 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=JBPaoBivN8zriKDMNSQFlvFvCYkkus0+7pvyH7Oa1rtEtqdKMNv0RBaYTh7EW7eLxn iBsoxuxYn4US4MmYFQ+TWiI4CsaTRAhTLyoiON8Br2I5maTUfcjy9CfJlVJw/DSYzvPt xTGA6L9UtRN937ZetjsKjbjsrEX0/+yyOhWBc=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Sorry, typo

On Mon, Jan 10, 2011 at 12:57 PM, Jui-Hao Chiang <juihaochiang@xxxxxxxxx> wrote:
Hi, Tim:

On Sat, Jan 8, 2011 at 12:09 AM, Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
At 06:02 +0000 on 07 Jan (1294380120), Jui-Hao Chiang wrote:
> One of the solution is to
> (a) Simply replace shr_lock with p2m_lock.

I think this is the best choice.   If we find that the p2m lock is a
bottleneck we can address it later.


Just to be skeptic.
Why doesn't mfn_to_gfn() take p2m lock when querying the p2m type? Is there any quarantee that the resulting type is correct and

I mean gfn_to_mfn()
 
trustful?
For example:
(1) User1 query the p2m type:
mfn_to_gfn(...&p2mt);
if (p2mt == p2m_ram_rw) /* do something based on the p2m type result? */

(2) User2 modify the p2m type
p2m_lock(p2m);
set_p2m_entry(..... p2m_ram_rw);
p2m_unlock(p2m);

Thanks,
Jui-Hao

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.