Re: [net-next] netlink: Use random autobind rover
From: David Miller <davem@davemloft.net>
Date: 2015-05-18 03:44:09
From: David Miller <davem@davemloft.net>
Date: 2015-05-18 03:44:09
From: Herbert Xu <herbert@gondor.apana.org.au> Date: Sun, 17 May 2015 10:45:34 +0800
On Sat, May 16, 2015 at 05:08:19PM -0400, David Miller wrote:quoted
As far as I can tell, this ought to be fine as-is.OK what about dropping the global rover altogether? Let's just start randomly like UDP. ---8<--- Currently we use a global rover to select a port ID that is unique. This used to work consistently when it was protected with a global lock. However as we're now lockless, the global rover can exhibit pathological behaviour should multiple threads all stomp on it at the same time. Granted this will eventually resolve itself but the process is suboptimal. This patch replaces the global rover with a pseudorandom starting point to avoid this issue. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Yep, this is fine, applied. Thanks!