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-devel

Re: [Xen-devel] do_softirq + interrupts

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [Xen-devel] do_softirq + interrupts
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 2 Sep 2005 09:20:28 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 02 Sep 2005 08:16:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200509011814.48047.hollisb@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200509011814.48047.hollisb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 2 Sep 2005, at 00:14, Hollis Blanchard wrote:

What confuses me is that any other interrupt could come in at point *** above, right? That interrupt will follow a very similar path, calling do_softirq again, and handle TIMER_SOFTIRQ. Then when the first do_softirq resumes, the
ASSERT will trip.

What am I missing?

You shouldn't call do_softirq() from nested Xen activations (this is unlike Linux, which is happy to do softirq work from arbitrary interrupt contexts).

For example, the main places where arch/x86 calls do_softirq are from within the idle loop, and in our code that exits a Xen activation we have code along the lines of:
 if (softirq_pending() and returning to guest context) do_softirq();

If you do softirq work in nested interrupt contexts in Xen you will find all kinds of bad races, because the locking strategies assume you don;t do this (most spinlocks are acquired without disabling interrupts, for example).

 -- Keir




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

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