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

Re: [Xen-devel] Fwd: [v3 14/15] Update Posted-Interrupts Descriptor during vCPU scheduling




> -----Original Message-----
> From: Dario Faggioli [mailto:dario.faggioli@xxxxxxxxxx]
> Sent: Tuesday, June 30, 2015 10:58 AM
> To: Wu, Feng
> Cc: xen-devel; keir@xxxxxxx; jbeulich@xxxxxxxx; andrew.cooper3@xxxxxxxxxx;
> Tian, Kevin; Zhang, Yang Z; george.dunlap@xxxxxxxxxxxxx; Wu, Feng
> Subject: Re: Fwd: [v3 14/15] Update Posted-Interrupts Descriptor during vCPU
> scheduling
> 
> On Mon, 2015-06-29 at 18:36 +0100, Andrew Cooper wrote:
> 
> >
> > The basic idea here is:
> > 1. When vCPU's state is RUNSTATE_running,
> >         - set 'NV' to 'Notification Vector'.
> >         - Clear 'SN' to accpet PI.
> >         - set 'NDST' to the right pCPU.
> > 2. When vCPU's state is RUNSTATE_blocked,
> >         - set 'NV' to 'Wake-up Vector', so we can wake up the
> >           related vCPU when posted-interrupt happens for it.
> >         - Clear 'SN' to accpet PI.
> > 3. When vCPU's state is RUNSTATE_runnable/RUNSTATE_offline,
> >         - Set 'SN' to suppress non-urgent interrupts.
> >           (Current, we only support non-urgent interrupts)
> >         - Set 'NV' back to 'Notification Vector' if needed.
> >
> It might be me, but it feels a bit odd to see RUNSTATE-s being (ab)used
> directly for this, as it does feel odd to see arch specific code being
> added in there.
> 
> Can't this be done in context_switch(), which is already architecture
> specific? I was thinking to something very similar to what has been done
> for PSR, i.e., on x86, put everything in __context_switch().
> 
> Looking at who's prev and who's next, and at what pause_flags each has
> set, you should be able to implement all of the above logic.
> 
> Or am I missing something?

As mentioned in the description of this patch, here we need to do
something when the vCPU's state is changed, can we get the
state transition in __context_switch(), such as "running -> blocking"?

Thanks,
Feng

> 
> Regards,
> Dario
> 
> --
> <<This happens because I choose it to happen!>> (Raistlin Majere)
> -----------------------------------------------------------------
> Dario Faggioli, Ph.D, http://about.me/dario.faggioli
> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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