Re: [2.6.14-rt1] slowdown / oops.

From: Rusty Russell
Date: Wed Nov 02 2005 - 21:09:24 EST


On Wed, 2005-11-02 at 16:33 +0100, Ingo Molnar wrote:
> local_bh_disable()/enable() is a NOP under PREEMPT_RT, and the
> ip_ct_deliver_cached_events PER_CPU code relies on not being preempted
> by the net_rx_action softirq handler. So this is a bug in PREEMPT_RT and
> the upstream code should be fine.
>
> Ingo
>
> Index: linux/net/ipv4/netfilter/ip_conntrack_core.c
> ===================================================================
> --- linux.orig/net/ipv4/netfilter/ip_conntrack_core.c
> +++ linux/net/ipv4/netfilter/ip_conntrack_core.c
> @@ -105,11 +105,11 @@ void ip_ct_deliver_cached_events(const s
> {
> struct ip_conntrack_ecache *ecache;
>
> - local_bh_disable();
> + read_lock_bh(&ip_conntrack_lock);
> ecache = &__get_cpu_var(ip_conntrack_ecache);
> if (ecache->ct == ct)
> __ip_ct_deliver_cached_events(ecache);
> - local_bh_enable();
> + read_unlock_bh(&ip_conntrack_lock);

This kind of change is troubling. I suppose we could go to per-cpu
locks, but it's still a loss.

Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman

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