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

[Xen-devel] Re: lazy context switching




On 26 Aug 2005, at 17:38, Hollis Blanchard wrote:

Hmmmmm. I think the basic problem is that in the exception handler we don't usually know we will need this state. The exception is a debug exception, where we know we will need it for the GDB stub.

However, we also have a hypervisor-dedicated timer, HDEC (hypervisor decrementer). Rather than using it as a plain tick which may or may not cause a scheduler exception, we can use it to *always* mean a context switch. In that case, we would always save the full state on HDEC entry, because we know it will always cause a context switch. Judging by set_ac_timer() callers, it seems that only the scheduler really uses the Xen timer tick. If non-scheduler components start using Xen-internal ticks, this approach wouldn't hold up (or rather, it would start becoming less efficient).

Why not move the non-volatile save/restore into your context switch routine, rather than deferring it until you exit the hypervisor?

 -- Keir


_______________________________________________
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®.