On Wed, 18 Nov 1998, Gopinath wrote:

>  
>  Hello, 
> 
>       thanks for the reply. I was going through the sources to understand
>       this interesting thread of discussion. I needed to clarify the following.
> 
>       Why is the do_bottom_half being called from two places
>               1. entry.S 
>               (I understand that it is called after return from every 
>               syscall/slow interrupt unless there is a nested interrupt)
> 
>               2. schedule() function itself.
>               (Is this to invoke the bottom_half_handling(), say, in 
>               case some process calls a sleep inside the kernel?)

Bottom half handling must be done in a timely fashion, because, for one thing,
timers are called from it. But it's not clear why schedule() *has* to have a
call to it in schedule(). Note that the bottom handling gets done first, as if
to say that it's higher priority than whatever process that must be dispatched.
It suspect that it lowers latency to have it done there, otherwise it would
have to wait until an interrupt or system call happens. It's just a convenient
place to do the job.

>       What (catastrophe!) might happen if the intr_count is not
>       artificially incremented inside the schedule() while calling 
>       the bottom_half?

An interrupt may occur and do_bottom_half will be re-entered, thus violating
the fundamental law that it must not be re-entered. 

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to