[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49292368.2060201@cosmosbay.com>
Date: Sun, 23 Nov 2008 10:33:28 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: David Miller <davem@...emloft.net>
CC: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Corey Minyard <minyard@....org>,
Stephen Hemminger <shemminger@...tta.com>,
benny+usenet@...rsen.dk,
Linux Netdev List <netdev@...r.kernel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Evgeniy Polyakov <zbr@...emap.net>,
Christian Bell <christian@...i.com>
Subject: [PATCH] net: Convert TCP/DCCP listening hash tables to use RCU
Hi David
Please find patch to convert TCP/DCCP listening hash tables
to RCU.
A followup patch will cleanup all sk_node fields and macros
that are not used anymore.
Thanks
[PATCH] net: Convert TCP/DCCP listening hash tables to use RCU
This is the last step to be able to perform full RCU lookups
in __inet_lookup() : After established/timewait tables, we
add RCU lookups to listening hash table.
The only trick here is that a socket of a given type (TCP ipv4,
TCP ipv6, ...) can now flight between two different tables
(established and listening) during a RCU grace period, so we
must use different 'nulls' end-of-chain values for two tables.
We define a large value :
#define LISTENING_NULLS_BASE (1U << 29)
So that slots in listening table are guaranteed to have different
end-of-chain values than slots in established table. A reader can
still detect it finished its lookup in the right chain.
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
---
include/net/inet_hashtables.h | 9 +
net/ipv4/inet_diag.c | 4
net/ipv4/inet_hashtables.c | 148 ++++++++++++++++----------------
net/ipv4/tcp_ipv4.c | 8 -
net/ipv6/inet6_hashtables.c | 94 ++++++++++++--------
5 files changed, 147 insertions(+), 116 deletions(-)
View attachment "listening_rcu.patch" of type "text/plain" (11540 bytes)
Powered by blists - more mailing lists