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] schedule() vs softirqs

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] schedule() vs softirqs
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Fri, 15 Dec 2006 13:09:41 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 15 Dec 2006 11:09:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1A88D8D.628A%keir@xxxxxxxxxxxxx>
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>
Organization: IBM Linux Technology Center
References: <C1A88D8D.628A%keir@xxxxxxxxxxxxx>
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2006-12-15 at 17:36 +0000, Keir Fraser wrote:
> On 15/12/06 17:27, "Hollis Blanchard" <hollisb@xxxxxxxxxx> wrote:
> 
> > We recently uncovered a bug on PowerPC where if a timer tick arrives
> > just inside schedule() while interrupts are still enabled, the
> > decrementer is never reprogrammed to that appropriate value. This is
> > because once inside schedule(), we never handle any subsequent softirqs:
> > we call context_switch() and resume the guest.
> 
> Easily fixed. You need to handle softirqs in the exit path to guest context.
> You need to do this final check with interrupts disabled to avoid races.

Ah OK, I see now how x86 is doing that. I don't think that code flow
really makes sense: why would you jump out of do_softirq() into assembly
just to call do_softirq() again?

Also, that doesn't solve the lazy register saving problem.

However, I think I see how we can implement our desired context_switch()
scheme in arch-specific code. The context_switch() call in schedule()
will return, so please don't add a BUG() after that. :)

-- 
Hollis Blanchard
IBM Linux Technology Center


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

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