WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] Re: Any hint about a weird behavior about scheduler?

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Subject: [Xen-ia64-devel] Re: Any hint about a weird behavior about scheduler?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 25 Jan 2006 10:39:07 +0000
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 25 Jan 2006 10:41:34 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <571ACEFD467F7749BC50E0A98C17CDD802C06CED@pdsmsx403>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <571ACEFD467F7749BC50E0A98C17CDD802C06CED@pdsmsx403>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 25 Jan 2006, at 03:36, Tian, Kevin wrote:

        The possible reason seems from your recent change to reduce lock
critical region in __enter_scheduler, where spin_unlock_irq is promoted
to the point before context_switch. That's obvious good, however to
leave a small window with interrupt enabled which may not be handled
correctly by current ia64 code. To move spin_unlock_irq backward after
context_switch, everything works well then.

        So Keir, have you seen any similar phenomenon per your
experience before? If yes, how about the cause? That may be different as
IA64, which however provide invaluable hint to help track down bogus
code on IA64.

I haven't seen this on x86. My gut feeling is that perhaps you are executing softirq work Linux style rather than Xen style.

That is: Linux is happy to execute softirq work at the tail of a hardirq, as long as it is the outermost hardirq context. In contrast, Xen expects softirqs only to be executed in the outermost Xen activation. So, for example, Xen does not check for softirq reentrancy in do_softirq, because that is never expected to happen. But even if you did add a reentrancy check you would risk deadlock (since you may interrupt e.g., hypercall context while it has a lock held, and that lock may be shared with code that is executed in softirq context).

Removing do_softirq() from irq_exit() will probably fix this problem for you, and generally improve correctness.

 -- Keir


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>