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/RFC] Wrong account for cpus other than 0 on hotplug

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH/RFC] Wrong account for cpus other than 0 on hotplug
From: Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>
Date: Fri, 13 Oct 2006 14:50:25 -0300
Delivery-date: Fri, 13 Oct 2006 10:50:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
Hi,

Is a x86_64 system with multiple CPUs, process accounting is done wrong after
one cpu goes off and on again (i.e.: a CPU bounded process is running
but gets 0% cpu for a time, until situation becomes normal again). 

The following patch is a first attempt to fix it. The struct keeps
zeroed after HYPERVISOR_vcpu_op() is called, thus leading to wrong
results. Accounting seems to be done right without it. However, I'm not
100 % sure we can just poke it out. Comments on this are very welcome.


-- 
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
--- linux-2.6.18.x86_64/arch/i386/kernel/time-xen.c.orig        2006-10-13 
13:06:12.000000000 -0400
+++ linux-2.6.18.x86_64/arch/i386/kernel/time-xen.c     2006-10-13 
13:16:50.000000000 -0400
@@ -721,14 +721,8 @@ irqreturn_t timer_interrupt(int irq, voi
 
 static void init_missing_ticks_accounting(int cpu)
 {
-       struct vcpu_register_runstate_memory_area area;
        struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu);
 
-       memset(runstate, 0, sizeof(*runstate));
-
-       area.addr.v = runstate;
-       HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area, cpu, &area);
-
        per_cpu(processed_blocked_time, cpu) =
                runstate->time[RUNSTATE_blocked];
        per_cpu(processed_stolen_time, cpu) =
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>