how to deal with MP system in a cell

6 views
Skip to first unread message

Zhangjun (V)

unread,
Mar 26, 2015, 3:51:05 AM3/26/15
to Jailhouse

Hi All,

 

I have a question.

 

As we know, Jailhouse haven’t a scheduler in hypervisor, so it cann’t schedule the cpu resources.

 

It only can assign one cpu to a cell. And how can we put more than two VCPU in a cell?

Valentine Sinitsyn

unread,
Mar 26, 2015, 4:03:01 AM3/26/15
to Zhangjun (V), Jailhouse
Hi Zhangun,

On 26.03.2015 10:47, Zhangjun (V) wrote:
> As we know, Jailhouse haven’t a scheduler in hypervisor, so it cann’t
> schedule the cpu resources.
>
> It only can assign one cpu to a cell. And how can we put more than two
> VCPU in a cell?
For Jailhouse, VCPU = CPU core, as there is no resource overcommitment.
You can assign more than one core to a cell, including non-root one, but
then all scheduling should be done on inmate side. Linux (which is also
technically an inmate in Jailhouse) happily uses more than one core.
Demo inmates don't, but you can still assign more than one CPU, say, to
apic-demo cell and see what happens (never tried it myself).

Valentine

Jan Kiszka

unread,
Mar 26, 2015, 5:01:32 AM3/26/15
to Valentine Sinitsyn, Zhangjun (V), Jailhouse
What will happen is that all assigned cores will start from the same
address and execute the code simultaneously. That's because Jailhouse
doesn't differentiate between BP and AP cores (for simplicity reasons).
Thus, if you want to exploit multicore in a non-root cell, your
bootstrap code has to account for this, i.e. check the CPU ID and branch
accordingly. If someone wants to write a demo for this, that would
surely be welcome.

Jan

Reply all
Reply to author
Forward
0 new messages