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

[Xen-devel] [PATCH] Remove duplicated code in vcpu_pause/domain_pause

To: Xen-Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Remove duplicated code in vcpu_pause/domain_pause
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Nov 2005 11:24:19 +1100
Delivery-date: Wed, 30 Nov 2005 00:25:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Xen-Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi All,
        Looking at xen/common/domain.c, I saw that domain_pause
duplicates the code from VIP_pause.  This patch eliminates the
duplicate code and makes domain pause a mirror for the existing
domain_unpause.

Is there a reason not to do this?

Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>

-----------------

diff -r ccf76e51e7e6 xen/common/domain.c
--- a/xen/common/domain.c       Tue Nov 29 16:59:03 2005
+++ b/xen/common/domain.c       Wed Nov 30 11:11:56 2005
@@ -293,11 +293,7 @@
     struct vcpu *v;
 
     for_each_vcpu( d, v )
-    {
-        BUG_ON(v == current);
-        atomic_inc(&v->pausecnt);
-        vcpu_sleep_sync(v);
-    }
+       vcpu_pause(v);
 
     sync_pagetable_state(d);
 }



Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2006.linux.org.au/
   Jan 23-28 2006      The Australian Linux Technical Conference!


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Remove duplicated code in vcpu_pause/domain_pause, Tony Breeds <=