All of lore.kernel.org
 help / color / mirror / Atom feed
From: annie li <annie.li@oracle.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Rebooting domu fails in nfs share exported from another domu on the same dom0
Date: Fri, 18 Jul 2014 17:43:23 -0400	[thread overview]
Message-ID: <53C994FB.80705@oracle.com> (raw)
In-Reply-To: <20140718210730.GB32582@laptop.dumpdata.com>


On 2014/7/18 17:07, Konrad Rzeszutek Wilk wrote:
> On Fri, Jul 18, 2014 at 04:31:13PM -0400, annie li wrote:
>> On 2014/7/18 16:22, Konrad Rzeszutek Wilk wrote:
>>> On Fri, Jul 18, 2014 at 04:17:02PM -0400, annie li wrote:
>>>> On 2014/7/18 15:43, Konrad Rzeszutek Wilk wrote:
>>>>> On Fri, Jul 18, 2014 at 03:31:43PM -0400, annie li wrote:
>>>>>> On 2014/7/18 14:53, Konrad Rzeszutek Wilk wrote:
>>>>>>> On Thu, Jul 17, 2014 at 12:56:12PM -0400, annie li wrote:
>>>>>>>> On 2014/7/17 11:49, Roger Pau Monné wrote:
>>>>>>>>> On 16/07/14 22:36, annie li wrote:
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> I hit a problem in such scenario: vm1 is running and export nfs service,
>>>>>>>>>> dom0 mount this nfs, and vm2 is booted in this nfs location. vm1 and vm2
>>>>>>>>>> are running on the same dom0.
>>>>>>>>>>
>>>>>>>>>> When this bug happens, the data flow is:  vm2 blkfront-> vm2 blkback->
>>>>>>> I am a bit confused here. 'vm2 blkfront -> vm2 blkback'? Did you
>>>>>>> mean 'dom0 blkback'?
>>>>>> Yes, Dom0 blkback.
>>>>>>
>>>>>>>>>> loop -> nfs file -> nfs client -> bridge priv1 -> vm1 vif -> vm1 netback
>>>>>>>>>> -> vm1 netfront.
>>>>>>> So both netback and netfront run in the same guest? I think you
>>>>>>> want these two swapped around (netfront -> netback).
>>>>>> No, the netfront in above routine means the one in guest vm1, and this is
>>>>>> network RX path in vm1.
>>>>> OK, so 'dom0 netback' then. As the netback thread is running in the
>>>>> initial domain?
>>>> Netback thread is running in Dom0 as normal, and the two vms are all
>>>> normal vm, not driver domain. Probably my initial description causes
>>>> some confusion.
>>>>
>>>>> So a revised view is:
>>>>>
>>>>>    vm2 blkfront -> dom0 blkback -> loop -> nfs file -> nfs client
>>>>> 	-> bridge priv1 -> vm1 vif -> dom0 netback -> vm1 netfront
>>>>>
>>>>> So with the grant map (blkfront -> blkback) the source is dom0
>>>>> and the destination is vm1.
>>>> You mean destination is vm2 here, right?
>>> Yes :-)
>>>> But I am little confused. Blkfront of vm2 sends out request to
>>>> blkback, and the data page is allocated from vm2. So the grant map
>>>> source is vm2, destination is dom0. Anything I missed here?
>>>>
>>>>>   For the grant copy, the source is
>>>>> dom0 and the destinatation is vm2 right? (or did I get my src
>>>>> and dst confused?).
>>>> You mean vm1 here, right?
>>> Heh.
>>>> If so, yes, source is dom0, and destination is vm1.
>>>> In grantcopy code, it checks whether the source is from dom0, if
>>>> not, then an error is thrown out. In this situation, the source is
>>> >from vm2 which is grant mapped.
>>> In both cases dom0 is part of the equation. In one
>>> case it is the destination and in another it is the source - both cases
>>> for the same page right?
>> Yes.
>> blkfront->blkback, dom0 is destination
>> netback->netfront, dom0 is the source
>>
>> When doing grantcopy for netback, xen requires the source is dom0. However,
>> it is vm2 in this case.
> Would it be possible in the hypervisor to have an extra check where you
> look to see if the source (dom0 in this case) has this page mapped
> from another guest? As in, this is a bit of A->B->C transition
> and we want to do A->C (B is dom0). If you figure out that the PFN
> belongs to A and you are doing a copy of A's page to C's page from B (dom0)
> page (and B PFN is actually mapped to be A's page), then why
> not just copy from A to C directly?
>
> Hmm. Linux kernel could actually also have this information (it does
> already I think) and we could search for that if the grant copy fails
> and if so alter the source and retry the grant copy. Instead of dom0
> being the source it is the C guest (vm2)? Thought I don't know if
> the hypercall allows us to make a grant_copy on behalf of two
> other guests.

Oh... I remember netback did have some grant_copy code on behalf of two 
guests on same server, and it was removed later on. So I think grantcopy 
A->C works for this case with the precondition that we can recognize 
this page is mapped from another guest.

Thanks
Annie
>
>> Thanks
>> Annie
>>
>>>> Thanks
>>>> Annie
>>>>> _______________________________________________
>>>>> Xen-devel mailing list
>>>>> Xen-devel@lists.xen.org
>>>>> http://lists.xen.org/xen-devel
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2014-07-18 21:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 20:36 Rebooting domu fails in nfs share exported from another domu on the same dom0 annie li
2014-07-17 15:49 ` Roger Pau Monné
2014-07-17 16:56   ` annie li
2014-07-18 18:53     ` Konrad Rzeszutek Wilk
2014-07-18 19:31       ` annie li
2014-07-18 19:43         ` Konrad Rzeszutek Wilk
2014-07-18 20:17           ` annie li
2014-07-18 20:22             ` Konrad Rzeszutek Wilk
2014-07-18 20:31               ` annie li
2014-07-18 21:07                 ` Konrad Rzeszutek Wilk
2014-07-18 21:43                   ` annie li [this message]
2014-07-21 10:02                     ` Wei Liu
2014-07-21 15:02                       ` annie li
2014-07-21 23:05                         ` Wei Liu
2014-07-23  1:58                           ` annie li
2014-07-28 14:14 ` David Vrabel
2014-07-28 16:14   ` annie li

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=53C994FB.80705@oracle.com \
    --to=annie.li@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xen.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 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.