Hi Dave,

 Thanks for explanation, but is there any delay between interrupt handler
and softirq execution. Suppose say INT7 triggered and its handler got
executed. Now this handler raised the softirq and finished its interrupt
context. Since interrupts preempts the current running task, after finishing
 IRQ context does the task should resumes. But since softirq was scheduled
(raised), then is it that softirq will be executed immediately after
interrupt handler or it takes some time when interrupted task was switched
out and scheduler recognizes a softirq was pending. I know that ksoftirqd is
responsible to execute all pending softirqs , who will invoke this, and for
every periodic time ksoftirqd invokes and executes softirq. Can you please
explain. Thanks.

Regards,
Sri.

On Thu, Sep 9, 2010 at 9:23 PM, Dave Hylands <[email protected]> wrote:

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

Reply via email to