From: Wei Liu Subject: Re: Rebooting domu fails in nfs share exported from another domu on the same dom0 Date: Mon, 21 Jul 2014 11:02:28 +0100 Message-ID: <20140721100227.GA1040@zion.uk.xensource.com> References: <53C7F088.5070005@citrix.com> <53C8002C.2020501@oracle.com> <20140718185312.GE15947@laptop.dumpdata.com> <53C9761F.3040803@oracle.com> <20140718194334.GK15947@laptop.dumpdata.com> <53C980BE.5040208@oracle.com> <20140718202215.GC14318@konrad-lan.dumpdata.com> <53C98411.6020404@oracle.com> <20140718210730.GB32582@laptop.dumpdata.com> <53C994FB.80705@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <53C994FB.80705@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: annie li Cc: wei.liu2@citrix.com, Roger Pau =?iso-8859-1?Q?Monn=E9?= , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, Jul 18, 2014 at 05:43:23PM -0400, annie li wrote: [...] > >> > >>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. > I have not followed this thread closely. The tracking facility was removed because it was dead at that time. See 43e9d19 ("xen-netback: remove page tracking facility"). However I think the latest netback with mapping scheme does have something similar. I can see there's a "foreign_queue" check in xenvif_gop_frag_copy. Is that not enough? Wei.