From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Question regarding Xen scheduler Date: Wed, 8 Oct 2014 14:57:02 +0100 Message-ID: <543542AE.9060607@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Zytaruk, Kelly" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 08/10/14 14:05, Zytaruk, Kelly wrote: > I would like to ask a question as to how the Xen scheduler handles certain situations. > From everything that I have read I understand that the scheduler treats Dom0 just like any other DomU in regards to scheduling. Correct. (XenServer has a tweak which allows dom0's credit to scale relative to current system load, but nothing more complicated.) > > My question is in regards to interrupt handlers, critical sections and kernel code. Is the Xen scheduler aware of whether the Dom0 is executing in kernel code versus user mode code? Can Dom0 kernel mode code be interrupted by the Xen scheduler and then a DomU run for a while before returning back to Dom0 kernel mode code? All domains may be interrupted by Xen. Xen itself knows whether the domain is in kernel or user mode, but the scheduler does not. > > What about interrupt handling routines either in Dom0 or DomU. Can a Task switch to another DomU / Dom0 occur if in the middle of an interrupt handler? Yes > > What if I am doing something time critical or sequence critical that can't be interrupted? Is there a way to tell the Xen scheduler that "I am in a critical section and can't be interrupted by another Dom" so that Xen won't task switch until I am done? No. > > Other than reading the source code is there a good reference that I can read for Xen internal details and architecture? Not which comes to mind. ~Andrew