KVM: s390: count vcpu wakeups in stat.halt_wakeup
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 11 Jul 2014 08:00:43 +0000 (10:00 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 1 Oct 2014 12:42:14 +0000 (14:42 +0200)
This patch introduces the halt_wakeup counter used by common code and uses it to
count vcpu wakeups done in s390 arch specific code.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c

index 1a6f6fd8bd34d0249317415e38a458e93251a9f2..2175f911a73a0606fda558f7417243fcedaf07e1 100644 (file)
@@ -192,6 +192,7 @@ struct kvm_vcpu_stat {
        u32 exit_stop_request;
        u32 exit_validity;
        u32 exit_instruction;
+       u32 halt_wakeup;
        u32 instruction_lctl;
        u32 instruction_lctlg;
        u32 instruction_stctl;
index 4cad00adef9316bfc162d84afbc0723e4259491d..a39838457f01778d81dd2827348ab0e8732936a0 100644 (file)
@@ -626,6 +626,7 @@ void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu)
                 */
                vcpu->preempted = true;
                wake_up_interruptible(&vcpu->wq);
+               vcpu->stat.halt_wakeup++;
        }
 }
 
index 0d5aa88e238bc6504ae017b08d8db17ad5e413d9..55aade49b6d1164f1ecd01f14f5cdb841077df6d 100644 (file)
@@ -50,6 +50,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
        { "exit_instruction", VCPU_STAT(exit_instruction) },
        { "exit_program_interruption", VCPU_STAT(exit_program_interruption) },
        { "exit_instr_and_program_int", VCPU_STAT(exit_instr_and_program) },
+       { "halt_wakeup", VCPU_STAT(halt_wakeup) },
        { "instruction_lctlg", VCPU_STAT(instruction_lctlg) },
        { "instruction_lctl", VCPU_STAT(instruction_lctl) },
        { "instruction_stctl", VCPU_STAT(instruction_stctl) },