I think this flag is enabled since I see that there is some information cat /proc/schedstat version 15 timestamp 4332448322 cpu0 12 0 65142011 32031105 32750248 22717261 2447620065997 58787405876 32964108 domain0 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000005 3254935 3249367 2404 4821929 3229 0 96 3249269 6990 6986 0 2577 4 0 0 6986 23305437 22926698 242127 354902327 136655 0 22841 22903857 0 0 0 0 0 0 0 0 0 724375 51388 0 domain1 00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f 3184279 3170371 13759 16042900 159 9 691 3169674 6836 6827 9 10875 0 0 2 410 23168825 22679032 475057 534512726 14817 23 66639 22612393 6 0 6 0 0 0 0 0 0 1884449 6647 0 cpu1 0 0 2140210892 1069012296 1070207005 1067616970 4593016088954 1172134807032 1071029875 domain0 00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000a 4637501 4632524 2203 6211781 2780 1 2 4632522 6282 6281 1 856 0 0 0 6281 14462483 14303529 126376 156661372 32595 0 9195 14294334 0 0 0 0 0 0 0 0 0 1234313 30153 0 domain1 00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f 5766088 5765346 577 841712 179 2 110 5765235 8803 8803 0 0 0 0 0 1514 14429905 14181972 228676 264974439 19576 0 35872 14146100 1 0 1 0 0 0 0 0 0 7622572 16252 0 cpu2 0 0 52577101 25565275 26801121 24132631 812994237346 43152983079 26937729 domain0 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000005 1125081 1123749 733 2378290 602 0 8 1123742 13138 13137 1 2018 0 0 0 13137 23954299 23750670 88041 190709270 115590 2 10688 23739982 0 0 0 0 0 0 0 0 0 979865 57090 0 domain1 00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f 1052559 1052538 15 114576 7 0 0 25607 13113 13113 0 0 0 0 0 55 23838711 23200171 613151 756023415 25505 0 52756 23147415 0 0 0 0 0 0 0 0 0 597157 46792 0 cpu3 112320 0 28758268 13561833 14268286 12145196 2012983455891 88768447010 14923733 domain0 00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000a 1705787 1704495 727 5715943 571 2 6 1704489 22311 22311 0 1476 0 0 0 22311 12332932 12230181 67994 135432986 34760 4 7662 12222519 1 0 1 0 0 0 0 0 0 997198 25844 0 domain1 00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f 1873701 1873686 8 15157 5 0 0 126733 30014 30014 0 0 0 0 0 48 12298175 11963494 304127 386917447 32071 0 44945 11918549 0 0 0 0 0 0 0 0 0 3374661 31194 0 Abhishek On Mon, Oct 8, 2012 at 2:42 PM, Abhishek Gupta <gupta59@xxxxxxxxxxxx> wrote: > Thanks for the answer. I am more of an application user. Is there a > quick way to check this flag and enable it if its disabled? > Abhishek > > > On Mon, Oct 8, 2012 at 2:39 PM, Marcelo Tosatti <mtosatti@xxxxxxxxxx> wrote: >> On Mon, Oct 08, 2012 at 02:55:25AM -0500, Abhishek Gupta wrote: >>> Hi, >>> >>> I am trying to get the steal time with 2 VMs (each with 1 Vcpu) pinned >>> to same core. >>> >>> While finding documentation on this, I came across your patches and >>> posts related to the implementation of this feature, so I thought it >>> would be best to ask you. >>> >>> I run the same application on these 2 VMs simultaneously and see the >>> performance difference. I am trying to read the steal time from inside >>> the guest using top, vmstat etc. >>> >>> Both, top and vmstat -s report the steal time (st) as 0. I also >>> checked that procps is in latest version. I am using virtio-net. I >>> suspect that the steal time is not being updated well. Is there >>> something which I need to configure for this to work? My Linux version >>> for guest image is: >>> >>> Linux server-147 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:15:26 >>> UTC 2010 x86_64 GNU/Linux >>> >>> And /proc/cpuinfo shows i: >>> >>> processor : 0 >>> vendor_id : GenuineIntel >>> cpu family : 6 >>> model : 2 >>> model name : QEMU Virtual CPU version 0.14.0 >>> stepping : 3 >>> cpu MHz : 2992.498 >>> cache size : 4096 KB >>> fpu : yes >>> fpu_exception : yes >>> cpuid level : 4 >>> wp : yes >>> flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov >>> pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good pni cx16 >>> hypervisor lahf_lm >> bogomips : 5984.99 >>> clflush size : 64 >>> cache_alignment : 64 >>> address sizes : 40 bits physical, 48 bits virtual >>> power management: >>> >>> >>> Another question I had was that is there a way to programmatically get >>> the value of steal cycles (e.g. from a C program) ? >>> Thanks, >>> >>> Abhishek >> >> Make sure CONFIG_SCHEDSTATS is enabled in your host kernel. >> >>> On Monday, June 13, 2011 6:40:02 PM UTC-5, Glauber Costa wrote: >>> > Hi, >>> > >>> > This series is a repost of the last series I posted about this. >>> > It tries to address most concerns that were raised at the time, >>> > plus makes uses of the static_branch interface to disable the >>> > steal code when not in use. >>> > >>> > >>> > Glauber Costa (7): >>> > KVM-HDR Add constant to represent KVM MSRs enabled bit >>> > KVM-HDR: KVM Steal time implementation >>> > KVM-HV: KVM Steal time implementation >>> > KVM-GST: Add a pv_ops stub for steal time >>> > KVM-GST: KVM Steal time accounting >>> > KVM-GST: adjust scheduler cpu power >>> > KVM-GST: KVM Steal time registration >>> > >>> > Documentation/kernel-parameters.txt | 4 ++ >>> > Documentation/virtual/kvm/msr.txt | 33 +++++++++++++ >>> > arch/x86/Kconfig | 12 +++++ >>> > arch/x86/include/asm/kvm_host.h | 8 +++ >>> > arch/x86/include/asm/kvm_para.h | 15 ++++++ >>> > arch/x86/include/asm/paravirt.h | 9 ++++ >>> > arch/x86/include/asm/paravirt_types.h | 1 + >>> > arch/x86/kernel/kvm.c | 72 +++++++++++++++++++++++++++++ >>> > arch/x86/kernel/kvmclock.c | 2 + >>> > arch/x86/kernel/paravirt.c | 9 ++++ >>> > arch/x86/kvm/x86.c | 60 +++++++++++++++++++++++- >>> > kernel/sched.c | 81 +++++++++++++++++++++++++++++---- >>> > kernel/sched_features.h | 4 +- >>> > 13 files changed, 296 insertions(+), 14 deletions(-) >>> > >>> > -- >>> > 1.7.3.4 >>> > >>> > -- >>> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >>> > the body of a message to majordomo@xxxxxxxxxxxxxxx >>> > More majordomo info at http://vger.kernel.org/majordomo-info.html >>> > Please read the FAQ at http://www.tux.org/lkml/ >>> >>> >>> >>> On Monday, June 13, 2011 6:40:02 PM UTC-5, Glauber Costa wrote: >>> > Hi, >>> > >>> > This series is a repost of the last series I posted about this. >>> > It tries to address most concerns that were raised at the time, >>> > plus makes uses of the static_branch interface to disable the >>> > steal code when not in use. >>> > >>> > >>> > Glauber Costa (7): >>> > KVM-HDR Add constant to represent KVM MSRs enabled bit >>> > KVM-HDR: KVM Steal time implementation >>> > KVM-HV: KVM Steal time implementation >>> > KVM-GST: Add a pv_ops stub for steal time >>> > KVM-GST: KVM Steal time accounting >>> > KVM-GST: adjust scheduler cpu power >>> > KVM-GST: KVM Steal time registration >>> > >>> > Documentation/kernel-parameters.txt | 4 ++ >>> > Documentation/virtual/kvm/msr.txt | 33 +++++++++++++ >>> > arch/x86/Kconfig | 12 +++++ >>> > arch/x86/include/asm/kvm_host.h | 8 +++ >>> > arch/x86/include/asm/kvm_para.h | 15 ++++++ >>> > arch/x86/include/asm/paravirt.h | 9 ++++ >>> > arch/x86/include/asm/paravirt_types.h | 1 + >>> > arch/x86/kernel/kvm.c | 72 +++++++++++++++++++++++++++++ >>> > arch/x86/kernel/kvmclock.c | 2 + >>> > arch/x86/kernel/paravirt.c | 9 ++++ >>> > arch/x86/kvm/x86.c | 60 +++++++++++++++++++++++- >>> > kernel/sched.c | 81 +++++++++++++++++++++++++++++---- >>> > kernel/sched_features.h | 4 +- >>> > 13 files changed, 296 insertions(+), 14 deletions(-) >>> > >>> > -- >>> > 1.7.3.4 >>> > >>> > -- >>> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >>> > the body of a message to majordomo@xxxxxxxxxxxxxxx >>> > More majordomo info at http://vger.kernel.org/majordomo-info.html >>> > Please read the FAQ at http://www.tux.org/lkml/ >>> -- >>> To unsubscribe from this list: send the line "unsubscribe kvm" in >>> the body of a message to majordomo@xxxxxxxxxxxxxxx >>> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html