summaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp_impl.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-07-28 10:34:42 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-07-31 20:41:59 +0200
commit9b7e26aee7cf27ffb37bb2f17229cecc89a833bd (patch)
tree12db224d80fe10f6a39a40f77a26c8e776f6410b /net/ipv6/udp_impl.h
parent615095752100748e221028fc96163c2b78185ae4 (diff)
downloadlinux-9b7e26aee7cf27ffb37bb2f17229cecc89a833bd.tar.bz2
netfilter: nft_set_rbtree: use seqcount to avoid lock in most cases
switch to lockless lockup. write side now also increments sequence counter. On lookup, sample counter value and only take the lock if we did not find a match and the counter has changed. This avoids need to write to private area in normal (lookup) cases. In case we detect a writer (seqretry is true) we fall back to taking the readlock. The readlock is also used during dumps to ensure we get a consistent tree walk. Similar technique (rbtree+seqlock) was used by David Howells in rxrpc. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/udp_impl.h')
0 files changed, 0 insertions, 0 deletions