[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1431620686.27831.63.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 14 May 2015 09:24:46 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Willem de Bruijn <willemb@...gle.com>
Cc: Network Development <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next] packet: fix warnings in rollover lock
contention
On Thu, 2015-05-14 at 11:53 -0400, Willem de Bruijn wrote:
> I principally want to avoid the lock contention on sk_receive_queue.lock,
> which is held for a lot longer while probing frames. But yes, I'd prefer to
> avoid the cacheline contention as well.
>
> The alternative is to keep the race and just replace the xchg with a
> straight assignment.
Please describe the race. It seems quite innocent at first look.
Clearly putting xchg() gives a false sense of security in this context.
Atomic ops should be reserved for cases we cannot avoid them,
not to give false hopes ;)
--
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