[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


  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Bei Guan <gbtju85@xxxxxxxxx>
  • Date: Wed, 16 Jul 2014 00:42:16 +0800
  • Delivery-date: Tue, 15 Jul 2014 16:42:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

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

 


Rackspace

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