Doubt regarding Tasklet and Bottom-havles

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

 



Hi all,

 In the LDD3 by Rubini, in the session about "Tasklet and Bottom-Half 
Processing", i had a doubt regarding a statement made.

"..top half to service a new interrupt while the bottom half is still 
working"

What would the situation be if the bottom half is waiting on a spin lock 
and at the same time another interrupt of the same handler has arrived.

Example:
I have a global varible which is accessed only by getting the spin 
lock.This variable is accessed only in bottom half.Based on the info
 obtained from the top half, the global variable is set in the bottom 
half.Suppose an interrupt has occured, the top half is executed and the 
required info is sent to the bottom half for a later execution. In the 
bottom half, i wait for the availability of a spin lock to access the 
variable. At the same time, if another interrupt occurs and changes the 
info given to the bottom half, does this create a loss of the interrupt 
handling in the bottom half? Is there any other way by which this kind of 
race condition can be avoided? Is it a good practise to wait on a spin 
lock in the bottom half??

Thanks in advance.

Regards,
Vijay Ram.C




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