From: Hollis Blanchard Subject: Re: RE: [Patch] Fix IDLE issue with sedf scheduler on IA64 Date: Wed, 13 Jul 2005 09:32:06 -0500 Message-ID: <5a876ebec55699d95a4dff98278bfc29@us.ibm.com> References: <571ACEFD467F7749BC50E0A98C17CDD807478DD8@pdsmsx403> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <571ACEFD467F7749BC50E0A98C17CDD807478DD8@pdsmsx403> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" Cc: "Magenheimer, Dan (HP Labs Fort Collins)" , xen-devel@lists.xensource.com, xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Jul 13, 2005, at 8:34 AM, Tian, Kevin wrote: >> Magenheimer, Dan (HP Labs Fort Collins) wrote: >> >> Is there a better way (for ia64)? I kind of like the solution >> Keir and Ian imply... is it possible in context_switch to simply >> "refuse" to switch to the idle domain? E.g. if the idle domain >> is the target of the switch, instead switch to domain0 (and >> make it runnable)? > > This seems not easy to be simply done in context_switch without common > change. Preventing switch to IDLE is easy, and a simple check in > context_switch can achieve. However the really bad thing is about > housekeep info within scheduler. Eg. domain0 may have been placed on > waitq, with begin of next period still far away. Stealing slice of IDLE > to Dom0 without notifying scheduler, may mess the future decision since > next schedule will happen on Dom0's context and base on dom0's > statistic > info... See how x86 does this in context_switch() (arch/x86/domain.c). In particular, __context_switch is avoided for the idle domain, so the context restored is some register pops in ret_from_intr/restore_all_xen (arch/x86/x86_32/entry.S). No scheduler changes or confusion necessary... -- Hollis Blanchard IBM Linux Technology Center