From: Hollis Blanchard Subject: Re: Re: lazy context switching Date: Tue, 30 Aug 2005 11:22:48 -0500 Message-ID: <200508301122.48245.hollisb@us.ibm.com> References: <200508251655.09988.hollisb@us.ibm.com> <32738a7d711e6cf6815ae0ef6f2994f9@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Dan Magenheimer List-Id: xen-devel@lists.xenproject.org On Tuesday 30 August 2005 10:25, Dan Magenheimer wrote: > Sorry for the late reply... keeping up with xen-devel > is getting tough! Yes, I just occasionally skim... > How does Linux do this on Power? Xen/ia64 heavily > leverages the equivalent Linux/ia64 code. As you > may know, Linux/ia64 scatters state all over > memory and uses "unwind descriptors" so that it > can recover all the state. I'd imagine Power does > something similar... Linux has a per-kernel thread stack, so '_switch' saves the current (i.e. kernel, not original usermode) nonvolatiles to the previous task structure. For Xen/PPC, we use a per-cpu stack, so we need to save the original (domain) nonvolatiles to the previous domain structure. -- Hollis Blanchard IBM Linux Technology Center