[netfilter-cvslog] r4306 -
branches/netfilter-ha/linux-2.6-actact/ct_sync
laforge at netfilter.org
laforge at netfilter.org
Sun Sep 25 17:27:31 CEST 2005
Author: laforge at netfilter.org
Date: 2005-09-25 17:27:30 +0200 (Sun, 25 Sep 2005)
New Revision: 4306
Added:
branches/netfilter-ha/linux-2.6-actact/ct_sync/actact.txt
branches/netfilter-ha/linux-2.6-actact/ct_sync/locking.txt
Log:
some thoughts on locking and active-active
Added: branches/netfilter-ha/linux-2.6-actact/ct_sync/actact.txt
===================================================================
--- branches/netfilter-ha/linux-2.6-actact/ct_sync/actact.txt 2005-09-25 15:26:59 UTC (rev 4305)
+++ branches/netfilter-ha/linux-2.6-actact/ct_sync/actact.txt 2005-09-25 15:27:30 UTC (rev 4306)
@@ -0,0 +1,53 @@
+terminology:
+
+ct_sync
+ the connection tracking synchronization code
+
+ct_sync instance
+ one instance of ct_sync
+
+ct_sync node
+ a node running one or more ct_sync instances
+
+ct_sync cluster
+ all ct_sync instances participating in one multicast group
+
+ct_sync peer
+ a remote ct_sync instance within the same cluster
+
+active ct_sync instance
+ a ct_sync instance that actively participates in packet forwarding
+
+passive ct_sync instance
+ a ct_sync instance that only passively listens for state updates by it's peers.
+
+eligible passive ct_sync instance
+ a ct_sync instance that is fully synchronized with it's peers and thus
+ eligible to become active
+
+
+data structuring:
+
+
+per-instance data:
+ name of instance
+ multicast group
+ syncdevice
+ whether we're in sync with all peers and thus eligible for becoming active
+ tunable parameters such as send_burst, recv_burst
+ cmarkbit of which local conntracks participate in this cluster
+ protocol handle
+ group of three threads and their waitqueues
+ sysfs attributes
+
+
+
+per-peer data structure:
+ incoming side:
+ last received seqno
+ whether we requested initsync or not
+ whether we requested retransmit or not
+ outgoing side:
+ last sent seqno
+ whether we've been requested to give initsync
+ whether we've been requested to retransmit
Added: branches/netfilter-ha/linux-2.6-actact/ct_sync/locking.txt
===================================================================
--- branches/netfilter-ha/linux-2.6-actact/ct_sync/locking.txt 2005-09-25 15:26:59 UTC (rev 4305)
+++ branches/netfilter-ha/linux-2.6-actact/ct_sync/locking.txt 2005-09-25 15:27:30 UTC (rev 4306)
@@ -0,0 +1,27 @@
+thoughts about locking
+
+1. ct_sync_instances list:
+
+- the list is traversed from
+ - bottom half context via hook functions l2drop/notrack (read)
+ - iterates over list to find all syncdev_ifindex
+ - bottom half context via conntrack notifiers (read)
+ - interates over list to find protoh
+ - userspace context via /sys/netfilter/ct_sync/instances/control (write)
+ - activate/deactivate
+ - create/destroy
+ - kernel thread context from the three ct_sync kernel threads (read)
+ - interates over list to send pending packets for each
+ instance
+ - can sleep while dealing with one item in the list
+- result
+ - writing control accesses very rare event
+ - majority of accesses are read-only
+ - some read accesses may inevitably sleep
+ - majority of accesses from process context
+
+2. locking of cts_buff structure
+
+2.a send path
+
+-
More information about the netfilter-cvslog
mailing list