Re: [PATCH] (8/8) Kill brlock

Stephen Hemminger (shemminger@osdl.org)
11 Mar 2003 16:31:46 -0800


On Tue, 2003-03-11 at 16:23, David S. Miller wrote:
> From: Stephen Hemminger <shemminger@osdl.org>
> Date: 11 Mar 2003 16:15:23 -0800
>
> Previous patches killed all remaining uses of brlock so bye.
>
> I'm all for this once patch 2/8 gets fixed up :-)
>
> So what is the new way to say "stop all incoming packet
> processing while I update data structure X"?

The caller's didn't need to stop packet processing, just remove their type
from a list or some other call back hook. A simple pointer update takes
care of removing a simple call back. The list delete rcu code takes care
of the memory barriers and doing the updates in the right order.
This ensures no future packet processing will grab that token

The next problem is how to ensure that packets in flight are not using
the hook. This is handled by call_rcu() for the more general case where
processing can be deferred (only used a couple places). Other places
use synchronize_kernel() which just waits. What call_rcu() does is make sure
that every processor has seen the change.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/