Skip to contentSkip to conversation

Question about the current vcpu.

DISCUSSION p z 3 participants 3 messages Mar 28, 2009 – Mar 30, 2009

lore
Share & tools
lore

p z

author
#0 lore raw

Hi all,

There is a macro current which may mean to get the current vcpu
information.

But the physical machine may be multi-core ,thus there may be two or more
vcpus running in parallel on different cores.Then which vcpu is the current? How should I understand the current vcpu please?

Thanks.

Cheer,

Signature · 1 line
zp

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 2 lines · p z

But the physical machine may be multi-core ,thus there may be two or
more vcpus running in parallel on different cores.Then which vcpu is the current? How should I understand the current vcpu please?

"current" returns the vcpu currently running on this physical cpu (ie, the one that's executing "current" itself). It will return different results for each pcpu at a given instant, and will return different values for a given pcpu over time as different vcpus are scheduled on itnb.

J

#2 lore raw
In reply to p z

Hi,

Actually, defined by Credit scheduler, each PCPU (physical CPU, if you run Xen on a multi-core machine, you get multiple PCPUs) has its own runqueue, and its own current vcpu as well. The PCPUs of the system makes their own scheduling decisions independently.

Best,

2009-03-30

Zhiyuan Shao

发件人: p z
发送时间: 2009-03-28 09:38:16
收件人: [email protected]
抄送:
主题: [Xen-devel] Question about the current vcpu.

Hi all,

There is a macro current which may mean to get the current vcpu information.

But the physical machine may be multi-core ,thus there may be two or more vcpus running in parallel on different cores.Then which vcpu is the current? How should I understand the current vcpu please?

Thanks.

Cheer,

Signature · 1 line
zp

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel