[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [PATCH][0/3] Steal time accounting for PVdomain/IA64 TAKE2



This patch intends to consider steal time for PV domains.

0) To see the effect
   just run top command you see x.x%st in Cpu(s) (for procps 3.2.7 etc)
   or cat /proc/stat and check last column of cpu.

1) Relation to x86

   I'm taken following functions from x86 code
   Hypervisor
     arch_do_vcpu_op()
   PVdomain
     init_missing_ticks_accounting()
   
   Other functions are created originally,
   but these are based on x86 implementation.
   Hypervior
      add copy_to_guest(runstate) at context_switch()
   PVdomain
      define consider_steal_time()
   also hypercall implementation is based on x86
   but I consider xencomm.

2) Tuning

   Current version is not tuned yet.
   just uses copy_to_guest not memcpy in context_switch
   The reason is the code becomes dirty,
   since xencomm functions are explicitly appeared in main routines,    

3) Process
   Same as x86

   Starting time 
     PV domain executes init_missing_ticks_accounting()
     this calls hypercall(PVdomain => Hypervisor)
     Hypervisor executes arch_do_vcpu_op()
     and set PV domain memory area.

   Running time
     Hypervisor reflects runstate info to PVguest every context_switch
     PV domain checks this info every timer_interruption and 
     reflects steal time.

4) For memory issue (suggested by Isaku)
  Current code just uses per_cpu area, 
  So we does not need suggested memory treatment.

This patch set composed of 3.
1)linux/arch/ia64/kernel/time.c (just import the code.)
2)Hypervisor patch (support hypercall and report runstate to PVdomain)
3)PVdomain patch (calling hypercall function and timer_interruption changes)

Signed-off-by: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>

The changes from previous version[RFC] is 
1) Use hypercall (previously data is transferred by shared_info)
2) timer_interrupt changes for accurate steal time accounting
    a) goto sentence is add for skip sys/user time accounting.
    b) itc rollback caused by vcpu migration is considered.
       if rollback occured, stop steal time consideration.
       (this check is done in consider_steal_time())

Thanks
Atsushi SAKAI


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.