 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Find the idle time of a physical cpu in Xen kernel
 Hi, I'd like to find the idle time of a physical cpu to calculate the pcpu utilization in Xen kernel (accurately, in the code file sched_credit.c). However, the method get_cpu_idle_time(cpu) doesn't seem to work well in the sched_credit.c. When the xen kernel boots, it blocked. Is there any other method getting the idle time of a pcpu in code file sched_credit.c? Another problem: the method vcpu_runstate_get() also doesn't work well in code file sched_credit.c. When the xen kernel boots, it has a "Panic" error. The debug information is pasted behind. How to get theÂrunning time of a vcpuÂin the code file sched_credit.c? Any suggestion is appreciated. Thank you very much. The debug message of using method vcpu_runstate_get() in code file sched_credit.c: (XEN) ----[ Xen-4.1.2 Âx86_64 Âdebug=n ÂNot tainted ]---- (XEN) CPU:  Â0 (XEN) RIP:  Âe008:[<ffff82c48011e7c3>] vcpu_runstate_get+0x33/0xc0 (XEN) RFLAGS: 0000000000010246  CONTEXT: hypervisor (XEN) rax: ffff8300df7f40c8  rbx: ffff8300df7f4000  rcx: 0000000000000000 (XEN) rdx: 0000000000000000  rsi: 0000000000000000  rdi: ffff8300df7f4000 (XEN) rbp: 0000000000000000  rsp: ffff82c48027fd18  r8: Â0000000000003fff (XEN) r9: Âffff830118a7c000  r10: ffff82c48029d880  r11: 0000000000000400 (XEN) r12: ffff82c48027fdb8  r13: ffff830118a93f68  r14: ffff82c48022f600 (XEN) r15: 0000000000000000  cr0: 000000008005003b  cr4: 00000000000026f0 (XEN) cr3: 0000000115a10000  cr2: 0000000000000000 (XEN) ds: 0000  es: 0000  fs: 0000  gs: 0000  ss: e010  cs: e008 (XEN) Xen stack trace from rsp=ffff82c48027fd18: (XEN)  Âffff8300df7f4000 ffff8300df7f4000 0000000000000000 ffff82c480117ff3 (XEN)  Â0000000000000000 ffff82c48011217c 0000000000000000 0000000000000000 (XEN)  Â0000000000000463 00000000000ff463 ffff830118a14000 00ff82c4801665b4 (XEN)  Â0000000000000001 ffff82c48027ff18 ffffffff81a01d18 ffff830100000000 (XEN)  Âffffffff81a01ce8 ffff82c48027fec0 ffff82c480298480 ffff82c48027fe88 (XEN)  Â00000000000000ff 0000000000000000 0000000000000001 ffff82c4802a9fc0 (XEN)  Âffff82c48027ff18 ffff83011ba0bd30 ffff82c4802bb6c0 0000000000000000 (XEN)  Â0000000000000000 ffff82c480118449 0000000000000960 ffff82c4802bb780 (XEN)  Âffff82c48022f600 ffff83011ba0ba10 ffff830118a92c70 ffff82c4802bb780 (XEN)  Âffff82c480118330 0000000000000000 0000000044e33fc1 ffff830118a92c78 (XEN)  Âffff830118a92c70 ffff82c480123b3b ffff82c4802bb780 ffff830118a92c70 (XEN)  Âffff83011ba0bd48 ffff82c4801240b7 ffff82c48027ff18 00000000000ff463 (XEN)  Âffff82c48027fec8 00000000ffffffff ffffffffffffffff ffff82c480298480 (XEN)  Âffff82c48027ff18 ffff82c48029c480 ffff82c480298480 ffff82c48012183d (XEN)  Âffff82c48027ff18 ffff8300df7f4000 ffffffff81a01d48 0000000000000001 (XEN)  Â00000000000f0735 000000000000c617 ffffffff81a01d10 ffff82c4801f5ca6 (XEN)  Âffffffff81a01d10 000000000000c617 00000000000f0735 0000000000000001 (XEN)  Âffffffff81a01d48 00000000000ebe17 0000000000000246 000000000000000e (XEN)  Â0000000000000016 7070616d20312d31 0000000000000001 ffffffff8100118a (XEN)  Â000000000000d2f2 ffffffff81a01ce8 0000000000000001 0000010000000000 (XEN) Xen call trace: (XEN)  Â[<ffff82c48011e7c3>] vcpu_runstate_get+0x33/0xc0 (XEN)  Â[<ffff82c480117ff3>] _csched_cpu_pick+0xf3/0x410 (XEN)  Â[<ffff82c48011217c>] do_memory_op+0xd9c/0x1bd0 (XEN)  Â[<ffff82c480118449>] csched_tick+0x119/0x370 (XEN)  Â[<ffff82c480118330>] csched_tick+0x0/0x370 (XEN)  Â[<ffff82c480123b3b>] execute_timer+0x4b/0x70 (XEN)  Â[<ffff82c4801240b7>] timer_softirq_action+0x87/0x220 (XEN)  Â[<ffff82c48012183d>] __do_softirq+0x6d/0xb0 (XEN)  Â[<ffff82c4801f5ca6>] process_softirqs+0x6/0x10 (XEN)   (XEN) Pagetable walk from 0000000000000000: (XEN) ÂL4[0x000] = 0000000000000000 ffffffffffffffff (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) FATAL PAGE FAULT (XEN) [error_code=0002] (XEN) Faulting linear address: 0000000000000000 (XEN) **************************************** (XEN) (XEN) Reboot in five seconds... (XEN) Resetting with ACPI MEMORY or I/O RESET_REG. Best Regards, Bei _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |