All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH/RFC] Wrong account for cpus other than 0 on hotplug
Date: Fri, 13 Oct 2006 14:50:25 -0300	[thread overview]
Message-ID: <20061013175025.GA13539@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

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"

[-- Attachment #2: patch.account --]
[-- Type: text/plain, Size: 679 bytes --]

--- 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) =

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

             reply	other threads:[~2006-10-13 17:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 17:50 Glauber de Oliveira Costa [this message]
2006-10-13 20:33 ` [PATCH/RFC] Wrong account for cpus other than 0 on hotplug Keir Fraser
2006-10-13 21:18   ` Glauber de Oliveira Costa
2006-10-13 21:56     ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061013175025.GA13539@redhat.com \
    --to=gcosta@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.