From: George Dunlap Subject: Re: How can Xen trigger a context switch in an HVM guest domain? Date: Sat, 31 Oct 2009 15:20:03 +0000 Message-ID: References: <8ee64b0c0910310402x7e3aabbeh26d77455408a9d0f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <8ee64b0c0910310402x7e3aabbeh26d77455408a9d0f@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: XiaYubin Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Context switching is a choice the guest OS has to make, and how that's done will differ based on the operating system. I think if you're thinking about modifying the guest scheduler, you're probably better off starting with Linux. Even if there's a way to convince Windows to call schedule() to pick a new process, I'm not sure you'll be able to tell it *which* process to choose. As far as mechanism on Xen's side, it would be easy enough to allocate a "reschedule" event channel for the guest, such that whenever you want to trigger a guest reschedule, just raise the event channel. -George On Sat, Oct 31, 2009 at 11:02 AM, XiaYubin wrote: > Hi, all, > > As I'm doing some research in cooperative scheduling between Xen and > guest domain, I want to know how many ways can Xen trigger a context > switch inside an HVM guest domain (which runs Windows in my case). Do > I have to write a driver (like balloon-driver)? Or a user process is > enough? Or there is an even simpler way? > > All your suggestions are appreciated. Thanks! :) > > -- > Yubin > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >