|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [question] will softirq handler potentially be called many times?
On 17/02/2012 04:47, "Kai Huang" <mail.kai.huang@xxxxxxxxx> wrote:
> Hi,
>
> I see the __do_softirq is called when ! in_atomic(), which means
> potentially __do_softirq may be interrupted by trap, exception,
> interrupt, etc, so seems softirq handler may be executed many times?
>
> For example, if interrupt happens after i =
> find_first_set_bit(pending), the same softirq hander will be called
> twice as the do_softriq will be called after all interrupt handler
> returned, and the pending bit has not been cleared yet when first
> do_softirq was called.
Can't happen, we only call do_softirq() when returning from an interrupt
back to guest context. Therefore a nested interrupt call does not cause
do_softirq to run.
-- Keir
> static void __do_softirq(unsigned long ignore_mask)
> {
> ......
> for ( ; ; )
> {
> ......
> i = find_first_set_bit(pending);
> <- interrupt happens
> clear_bit(i, &softirq_pending(cpu));
> (*softirq_handlers[i])();
> }
> }
>
> -cody
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |