WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xenpaging: check p2mt in p2m_mem_paging function

To: Tim Deegan <tim@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xenpaging: check p2mt in p2m_mem_paging functions
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 13 Oct 2011 14:14:02 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 13 Oct 2011 05:16:33 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1318508064; l=1417; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=0qHq/m0HXp1r4nKWmIJLlw79zpM=; b=xAOuxUKw346DOy6ox3zFdwryb/rWH3QGIfFfcvJwz3MZumpTPhGt40jyy7DA7Is5XcC 1KGQoWbw7+MoRn+zzazm+DHJM931rZtdRdAJW64rDb+LNb6D2YkdUGuYL1l49eZXp033C jTAubU9ty7LhptCIzCvc/OcEzFMWZwwz7Kg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111013112755.GE44937@xxxxxxxxxxxxxxxxxxxxx>
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: <bc64a435d572680efb22.1318336951@xxxxxxxxxxxx> <20111013112755.GE44937@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
On Thu, Oct 13, Tim Deegan wrote:

> Hi, 
> 
> At 14:42 +0200 on 11 Oct (1318344151), Olaf Hering wrote:
> > @@ -897,9 +903,16 @@ void p2m_mem_paging_resume(struct domain
> >      {
> >          p2m_lock(p2m);
> >          mfn = p2m->get_entry(p2m, rsp.gfn, &p2mt, &a, p2m_query, NULL);
> > -        set_p2m_entry(p2m, rsp.gfn, mfn, 0, p2m_ram_rw, a);
> > -        set_gpfn_from_mfn(mfn_x(mfn), rsp.gfn);
> > -        audit_p2m(p2m, 1);
> > +        /* Allow only pages which were prepared properly or pages which 
> > were nominated but not evicted */
> > +        if ( mfn_valid(mfn) && ( p2mt == p2m_ram_paging_in  || p2mt == 
> > p2m_ram_paging_in_start ) )
> 
> Wouldn't a nominated-but-not-evicted page have type p2m_ram_paging_out?

Yes, but in the page-in path it will be p2m_ram_paging_in_start with a
valid mfn.

> > +        {
> > +            set_p2m_entry(p2m, rsp.gfn, mfn, 0, p2m_ram_rw, a);
> > +            set_gpfn_from_mfn(mfn_x(mfn), rsp.gfn);
> > +            audit_p2m(p2m, 1);
> > +        /* May be called more than once if the gfn was populate from 
> > different vcpus */
> > +        } else if ( p2mt != p2m_ram_rw ) {
> > +            printk("resume: %d %lx %x %lx\n", d->domain_id, rsp.gfn, p2mt, 
> > mfn_x(mfn));
> 
> This should be a gdprintk of some kind, probably XENLOG_WARNING unless
> it happens a lot. 

Its just debug, perhaps that gfn was already use for something else
while the pager processed multiple page-in requests from different
vcpus.

Do you want me to resend this patch?

Olaf

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