AW: Kernel sincronization problem & bottom halves

Welwarsky, Matthias (Matthias.Welwarsky@Dresdner-Bank.com)
Wed, 26 Aug 1998 09:54:43 +0200


> I am intrested in what is happening, let's say, when udp_rcv() function
> is
> executed. Normaly, this function should be called by from inside the
> NET_BH
> bottom handler, responsible for carring out all the actions related to
> network.
> Can this function be interrupted in the middle of its execution and then
> called
> again ? (I.E. can be interrupted the processing of one UDP packet by the
> processing of another UDP packet then resumed safely ?). Maybe this never
> happen
> because any given bottom half 'task' is atomical in the respect of other
> 'tasks'
> at least from the same bottom half.
>
IMHO bottom halves are atomical but for hardware interrupts. So,
unless you call udp_rcv directly from a device drivers hardware interrupt
(which you should not) you´re safe and don´t need to worry about reentrancy.
AFAICT, bottom halves are _generally_ atomic, i.e. no bottom half can be
interrupted by any other bottom half, even on SMP.

> Actualy there is another general question : who can interrupt a bottom
> half
> 'task' (if any) ?
>
Hardware.

Gruss,
Matthias
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html