Re: Doubt in bottom halves.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello...

> I have a doubt regarding interrupt handling and bottom halves.
> I have registered an interrupt handler which is not a shared
> interrupt. When the interrupt occurs, the interrupt handler is called
> which schedules the tasklet and is proccessed During the proccessing
> of the tasklet, if the same interrupt comes again, the interrupt will
> the handler again. At that time, will the tasklet be scheduled again
> after the current executing tasklet ?? Can anybody please explain
> this scenario briefly ?

Yes, you can still schedule the new tasklet so it is executed right 
after the last same tasklet. I never tried it by myself, but according 
to what I read on Linux kernel development, unless the current 
tasklet's state is still in TASKLET_STATE_SCHED and/or disabled, you 
are free to reschedule your tasklet (inside the interrupt handler)

This is possible, thanks to the fact that tasklet_action() and 
tasklet_hi_action() always check for pending tasklet continously. When 
the number of pending tasklets are above certain limits, big chance it 
is executed by ksoftirqd, not when do_irq() is about to return to 
kernel/user context. But you don't have to worry about it.

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux