xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bei Guan <gbtju85@gmail.com>
To: xen-devel <xen-devel@lists.xen.org>
Subject: Find the idle time of a physical cpu in Xen kernel
Date: Wed, 16 Jul 2014 00:42:16 +0800	[thread overview]
Message-ID: <CAEQjb-SAZFLAo2ix4EZGK2pZYMzrLFpVR0idc+9VMUV229bYgQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 4089 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 22664 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

                 reply	other threads:[~2014-07-15 16:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEQjb-SAZFLAo2ix4EZGK2pZYMzrLFpVR0idc+9VMUV229bYgQ@mail.gmail.com \
    --to=gbtju85@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).