|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Vcpu allocation for a newly created domU
>> When you enter the scheduler (and also __context_switch) you are
>> running VCPU=current on CPU=smp_processor_id().
>
> this is true only if current is not set to the next vcpu. but if you
> look at context_switch() just before calling __context_switch ,
> set_curent(next) is done. At this point current is actually the next
> vcpu to be scheduled.
>
First of all: I only said that current->proccessor ==
smp_processor_id() will hold on scheduler entry. But this equality is
actually stronger, I believe it will hold always.
>
>> At this point in time
>> current->processor and smp_processor_id() will match.
>
> So vcpu->processor need not match smp_processor_id()....
Except that the next vcpu (or current, after set_current has been
executed) will also have ->processor filed set to smp_processor_id().
You have to explicitly migrate VCPUs between CPUs (and set their
->processor field in the process) to make them runnable on a different
CPU. For example the credit scheduler does that in
csched_runq_steal(). If it deems a VCPU to be migratable
(__csched_vcpu_is_migrateable) it will remove it from it's current
runqueue (__runq_remove) and update the processor field (vc->processor
= cpu)
Is that clear now?
Gr(z)egor(z)
>
> Thanks,
> Sandesh
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should
> check this email and any attachments for the presence of viruses. The company
> accepts no liability for any damage caused by any virus transmitted by this
> email.
>
> www.wipro.com
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|