[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] A suggestion about processing irq
On Mon, 2013-08-19 at 02:29 +0000, êìë wrote: > Hello, > While I was reading gic handling part of xen arm, I noticed that, in > gic_set_guest_irq function, > if lr_pending is not empty, the arrival irq is also stored into pending list. > I think although lr_pending is not empty, there maybe empty slots in lr, and > if so, we can insert > IRQ immediately. Since I'd like to keep the IRQ in priority order, how about > checking the > highest priority in lr_pending list rather than emptiness? > Here goes the simple patch: Julien & Stefano know about this stuff -- guys? Julien was planning to rework a bunch of the interrupt handling stuff, I don't know if that was orthogonal to this or not. > > Signed-off-by: Jaemin Kim <jmkim.kim@xxxxxxxxxxx> > --- > diff -urN xen/arch/arm/gic.c xen2/arch/arm/gic.c > --- xen/arch/arm/gic.c 2013-07-30 10:16:45.076382483 +0900 > +++ xen2/arch/arm/gic.c 2013-07-31 11:19:28.094799335 +0900 > @@ -587,12 +587,17 @@ > unsigned int state, unsigned int priority) > { > int i; > - struct pending_irq *iter, *n; > + struct pending_irq *iter, *n, *first_item; > unsigned long flags; > spin_lock_irqsave(&gic.lock, flags); > + > + first_item = list_entry( (&v->arch.vgic.lr_pending)->next, > + typeof(*iter), lr_queue ); > - if (( v == current ) && (list_empty(&v->arch.vgic.lr_pending) )) > + if ( ( v == current ) && > + ( list_empty(&v->arch.vgic.lr_pending) || > + ( priority > first_item->priority ) ) ) > { > i = find_first_zero_bit(&this_cpu(lr_mask), nr_lrs); > if (i < nr_lrs) { > --- > Thanks. > Best Regards. > Jaemin Kim > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |