All of lore.kernel.org
 help / color / mirror / Atom feed
* a question about powervm
@ 2016-12-19  9:09 Liu ping fan
  2016-12-19  9:58 ` Michal Suchanek
  0 siblings, 1 reply; 4+ messages in thread
From: Liu ping fan @ 2016-12-19  9:09 UTC (permalink / raw)
  To: linuxppc-dev

Hi guys,

I am using a pSeries. It runs on powerVM.
My question is whether the cpuX under /sys/devices/system/cpu
corresponds to a real cpu or not.
I think it is not the same as the cpu on kvm-guest, which is emulated
by a linux process.

Thx.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a question about powervm
  2016-12-19  9:09 a question about powervm Liu ping fan
@ 2016-12-19  9:58 ` Michal Suchanek
  2016-12-20  3:30   ` Liu ping fan
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Suchanek @ 2016-12-19  9:58 UTC (permalink / raw)
  To: Liu ping fan; +Cc: linuxppc-dev

Hello,

On 19 December 2016 at 10:09, Liu ping fan <kernelfans@gmail.com> wrote:
> Hi guys,
>
> I am using a pSeries. It runs on powerVM.
> My question is whether the cpuX under /sys/devices/system/cpu
> corresponds to a real cpu or not.
> I think it is not the same as the cpu on kvm-guest, which is emulated
> by a linux process.

In general the hypervisor (powerVM or KVM) needs to disable access of
the guest to some CPU features in order to manage multiple guests. So
some CPU features are either disabled or emulated by the hypervisor to
prevent the guest from interfering with isolation of the guests from
each other and the host. On the other hand, emulating the whole CPU is
ineffective so to achieve reasonable guest speed it must run on a real
CPU most of the time. That means that in most cases the CPU you see in
the guest will have a subset of the features of the CPU the host sees.

Some virtualization solutions allow to overcommit CPU time so you can
allocate more CPUs to guests than you physically have. Then when
running the guest will use an actual physical CPU but when it is
sleeping other guest may use the CPU.

HTH

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a question about powervm
  2016-12-19  9:58 ` Michal Suchanek
@ 2016-12-20  3:30   ` Liu ping fan
  2016-12-20  6:19     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Liu ping fan @ 2016-12-20  3:30 UTC (permalink / raw)
  To: Michal Suchanek; +Cc: linuxppc-dev

On Mon, Dec 19, 2016 at 5:58 PM, Michal Suchanek <hramrach@gmail.com> wrote:
> Hello,
>
> On 19 December 2016 at 10:09, Liu ping fan <kernelfans@gmail.com> wrote:
>> Hi guys,
>>
>> I am using a pSeries. It runs on powerVM.
>> My question is whether the cpuX under /sys/devices/system/cpu
>> corresponds to a real cpu or not.
>> I think it is not the same as the cpu on kvm-guest, which is emulated
>> by a linux process.
>
> In general the hypervisor (powerVM or KVM) needs to disable access of
> the guest to some CPU features in order to manage multiple guests. So
> some CPU features are either disabled or emulated by the hypervisor to
> prevent the guest from interfering with isolation of the guests from
> each other and the host. On the other hand, emulating the whole CPU is
> ineffective so to achieve reasonable guest speed it must run on a real
> CPU most of the time. That means that in most cases the CPU you see in
> the guest will have a subset of the features of the CPU the host sees.
>
Thank you for the explanation. And sorry not to explain my question clearly.
I wonders about the mapping between guest-CPU and physical cpu. On
powerVM, except the feature exposed by host, it is 1:1 map right?

> Some virtualization solutions allow to overcommit CPU time so you can
> allocate more CPUs to guests than you physically have. Then when
> running the guest will use an actual physical CPU but when it is
> sleeping other guest may use the CPU.
>
Yes, agree.

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a question about powervm
  2016-12-20  3:30   ` Liu ping fan
@ 2016-12-20  6:19     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2016-12-20  6:19 UTC (permalink / raw)
  To: Liu ping fan, Michal Suchanek; +Cc: linuxppc-dev

On Tue, 2016-12-20 at 11:30 +0800, Liu ping fan wrote:
> Thank you for the explanation. And sorry not to explain my question
> clearly.
> I wonders about the mapping between guest-CPU and physical cpu. On
> powerVM, except the feature exposed by host, it is 1:1 map right?

No, not necessarily.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-20  6:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19  9:09 a question about powervm Liu ping fan
2016-12-19  9:58 ` Michal Suchanek
2016-12-20  3:30   ` Liu ping fan
2016-12-20  6:19     ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.