All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <George.Dunlap@eu.citrix.com>
To: Jui-Hao Chiang <juihaochiang@gmail.com>
Cc: MaoXiaoyun <tinnycloud@hotmail.com>,
	xen devel <xen-devel@lists.xensource.com>,
	Tim Deegan <Tim.Deegan@citrix.com>
Subject: Re: mem_sharing: summarized problems when domain is dying
Date: Fri, 21 Jan 2011 16:41:47 +0000	[thread overview]
Message-ID: <AANLkTinNQSC+KSgZnkssLocPgYwrp-Tu8vySTPb3XNBp@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikpe-zo8hZNp3ERKS3uO5wpC2vWpun4MQqbWcTQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

Tim / Xiaoyun, do you think something like this might work?

 -George

On Fri, Jan 21, 2011 at 4:32 PM, George Dunlap <dunlapg@umich.edu> wrote:
> [sorry, accidentally sent too early]
>
> On Fri, Jan 21, 2011 at 4:29 PM, George Dunlap <dunlapg@umich.edu> wrote:
>> I'm not sure the exact rationale behind the "cannot fail" flag; but it
>> looks like in grant_table.c, both callers of gfn_to_mfn_unshare()
>> handle the case where the returned p2m entry is just
>
> ...invalid.  I wonder if "unsharing" the page, but marking the entry
> invalid during death would help.
>
> I suppose the problem there is that if you're keeping the VM around
> but paused for analysis, you'll have holes in your address space.  But
> just returning an invalid entry to the callers who try to unshare
> pages might work.
>
>  -George
>

[-- Attachment #2: interpret_must_succeed_if_dying.diff --]
[-- Type: text/plain, Size: 680 bytes --]

diff -r 9ca9331c9780 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Fri Jan 21 15:37:36 2011 +0000
+++ b/xen/include/asm-x86/p2m.h	Fri Jan 21 16:41:58 2011 +0000
@@ -390,7 +390,14 @@
                                       must_succeed 
                                       ? MEM_SHARING_MUST_SUCCEED : 0) )
         {
-            BUG_ON(must_succeed);
+            if ( must_succeed
+                 && p2m->domain->is_dying )
+            {
+                mfn = INVALID_MFN;
+                *p2mt=p2m_invalid;
+            }
+            else
+                BUG_ON(must_succeed);
             return mfn;
         }
         mfn = gfn_to_mfn(p2m, gfn, p2mt);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2011-01-21 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 16:19 mem_sharing: summarized problems when domain is dying Jui-Hao Chiang
2011-01-21 16:29 ` George Dunlap
2011-01-21 16:32   ` George Dunlap
2011-01-21 16:41     ` George Dunlap [this message]
2011-01-21 16:53       ` Tim Deegan
2011-01-22 11:17       ` MaoXiaoyun
2011-01-21 19:45 ` Jui-Hao Chiang
2011-01-24 13:14   ` MaoXiaoyun
2011-01-24 14:08     ` George Dunlap
2011-01-25  4:13     ` Linux Guest Crash on stress test of memory sharing MaoXiaoyun
     [not found]       ` <BLU157-w350046650B3C4960C4B1F2DAFC0@phx.gbl>
2011-01-25  6:23         ` MaoXiaoyun
2011-01-24 14:02   ` mem_sharing: summarized problems when domain is dying Tim Deegan

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=AANLkTinNQSC+KSgZnkssLocPgYwrp-Tu8vySTPb3XNBp@mail.gmail.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Tim.Deegan@citrix.com \
    --cc=juihaochiang@gmail.com \
    --cc=tinnycloud@hotmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.