[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Vcpu allocation for a newly created domU


  • To: Sandesh <sandesh.ahiremath@xxxxxxxxx>
  • From: "Grzegorz Miłoś" <gm281@xxxxxxxxx>
  • Date: Fri, 20 Jun 2008 10:41:41 +0100
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 20 Jun 2008 02:42:03 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=fi2ZzbaHUF0YkcCeaRkQFx/Fr80tlwogEIo4I3zJ8EhEXQpShrGP8S0YLecl/SL5aw 5iEkU5S7RMEf99dwr5QEI6HILozZgEOd2DBPx3JUmnrdNbXokRDkVy1Hys0TA/McXHMP kqkG1SaTpEKW8sz+33fEhoNcEcVQ9ppZol84k=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

>> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.