Re: Wake_up_process() in interrupt handler

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

 





  An interrupt handler has two parts .. one the top half which includes 
the important tasks that are to be executed as soon as an interrupt occurs 
and bottome half which are the instructions that are of less importance. 
So when an interrupt occurs it executes the top half and returns to the 
process that was executing. Then when the cpu is free or doing some less 
important task like executing in the user space it will do the bottom half 
job !!!!


On Thu, 31 Oct 2002, Jan Hudec wrote:

> On Thu, Oct 31, 2002 at 01:01:27PM -0800, kernel_learner wrote:
> >   I am don' completely understand the concept of
> > bottom_half...can you give me some pointers abuot
> > that..
> 
> I never needed it, so I don't know that much. And I don't recall where
> I read about them. I think there is something about them in the Linux Kernel
> Module Programming Guide and/or the Kernel Hacking Guide (both are a bit
> obsolete, but the basic idea of four contexts did not change.
> 
> There are four contexts - interrupt, bottom_half, process and userland
> (the correct names are probably little different). Interrupt handlers
> are run with interrupts disabled. They should be fast not to mask other
> interrupts for too long. If more work has to be done, the interrupt
> requires a bottom-half or tasklet (limited number of bottomhalves exist,
> one is used to call tasklets, which are function pointers in a list).
> Bottom-halves are called "as soon as possible and is safe", which in
> practice is in context-switch AFAIK (ie. return to user-land or timer
> interrupt (it calls schedule)). You can only sleep (ie. call schedule())
> in process context which is syscalls and kernel threads and which is
> associated with a process (has valid current), since scheduler works in
> terms of processes.
> 
> -------------------------------------------------------------------------------
> 						 Jan 'Bulb' Hudec <bulb@ucw.cz>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

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