Hi Sri,

Replying to the list...

On Thu, Sep 9, 2010 at 5:08 PM, Sri Ram Vemulpali wrote:
> Hi,
> Can any one explain, when interrupt handler schedules softirq, for bottom
> half work, when is that softirq is executed. Is it immediately after
> interrupt handler context or after some time later when scheduler was
> invoked.

Softirqs are run with interrupts enabled, and run when all of the
nested irqs have completed. Task switching is suspended while
irqs/softirs are being run.

IRQA occurs
IRQA handler gets called
IRQB occurs, interrupting IRQA (assuming IRQA was setup to allow
itself to be interrupted)
IRQB schedules a softirq
IRQB exits
IRQA continues to run
IRQA exits
we're now in a situation where the IRQ depth is zero, so softirqs are run.
when all softirqs are finished, then regular scheduling of tasks resumes.

> I am trying to understand execution context of BHs. I know that tasklets
> execute at relaxed time when system deems to execute. But what about
> softirq. Since softirq's are in nature high in priority, therefore they
> should run immediately after IRQ. I am trying to understand is there any
> latency between IRQ and softirq execution scheduled by that corresponding
> IRQ. Please can anyone explain the sequence of operations how the softirq is
> recognized (that it was set) and scheduled to execute.

softirqs and tasklets are really the same thing (as far as I know).
They run with interrupts enabled, but preemption disabled.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to