[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimZ=i1=c3SaEsw2_ncWJenuOgoSmHpMuN_UiG4K@mail.gmail.com>
Date: Wed, 8 Sep 2010 16:49:27 -0700
From: Jesse Gross <jesse@...ira.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next-2.6] net: inet_add_protocol() can use cmpxchg()
On Wed, Sep 8, 2010 at 3:56 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Use cmpxchg() to get rid of spinlocks in inet_add_protocol() and
> friends.
>
> inet_protos[] & inet6_protos[] are moved to read_mostly section
>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
What's the benefit to this? It's hard to imagine that add/deleting
protocols is highly contended. On the other hand, a simple spinlock
is very easy to look at and verify correct, while this takes a little
more thought.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists