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 1 of 4] p2m: Keep statistics on order of p2m entr

To: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 4] p2m: Keep statistics on order of p2m entries
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Fri, 6 May 2011 15:23:58 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 06 May 2011 07:24:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <be5d93d38f283329dea1.1304690478@elijah>
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: <patchbomb.1304690477@elijah> <be5d93d38f283329dea1.1304690478@elijah>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Hi, 

Can you please add this:

 [diff]
 showfunc = True

to your .hgrc?  It makes reviewing much easier. 

There are two places where this patch changes the control flow of p2m
operations: 

> @@ -167,11 +169,14 @@
>  void ept_free_entry(struct p2m_domain *p2m, ept_entry_t *ept_entry, int 
> level)
>  {
>      /* End if the entry is a leaf entry. */
> -    if ( level == 0 || !is_epte_present(ept_entry) ||
> -         is_epte_superpage(ept_entry) )
> +    if ( level == 0 || !is_epte_present(ept_entry) || 
> is_epte_superpage(ept_entry) )
> +    {
> +        if ( is_epte_countable(ept_entry) )
> +            p2m->stats.entries[level]--;
>          return;
> +    }
>  
> -    if ( level > 1 )
> +    if ( level > 0 )
>      {

and similarly: 

> @@ -184,11 +184,15 @@
>  {
>      /* End if the entry is a leaf entry. */
>      if ( page_order == 0
> -         || !(l1e_get_flags(*p2m_entry) & _PAGE_PRESENT)
> +         || !(l1e_get_flags(*p2m_entry) & _PAGE_PRESENT) 
>           || (l1e_get_flags(*p2m_entry) & _PAGE_PSE) )
> +    {
> +        if ( l1e_get_flags(*p2m_entry) )
> +            p2m->stats.entries[page_order/9]--;
>          return;
> -
> -    if ( page_order > 9 )
> +    }
> +
> +    if ( page_order )

here.  Can you explain those in a bit more detail?

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

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