1. 23 4月, 2014 1 次提交
    • Y
      tipc: purge tipc_net_lock lock · 7216cd94
      Ying Xue 提交于
      Now tipc routing hierarchy comprises the structures 'node', 'link'and
      'bearer'. The whole hierarchy is protected by a big read/write lock,
      tipc_net_lock, to ensure that nothing is added or removed while code
      is accessing any of these structures. Obviously the locking policy
      makes node, link and bearer components closely bound together so that
      their relationship becomes unnecessarily complex. In the worst case,
      such locking policy not only has a negative influence on performance,
      but also it's prone to lead to deadlock occasionally.
      
      In order o decouple the complex relationship between bearer and node
      as well as link, the locking policy is adjusted as follows:
      
      - Bearer level
        RTNL lock is used on update side, and RCU is used on read side.
        Meanwhile, all bearer instances including broadcast bearer are
        saved into bearer_list array.
      
      - Node and link level
        All node instances are saved into two tipc_node_list and node_htable
        lists. The two lists are protected by node_list_lock on write side,
        and they are guarded with RCU lock on read side. All members in node
        structure including link instances are protected by node spin lock.
      
      - The relationship between bearer and node
        When link accesses bearer, it first needs to find the bearer with
        its bearer identity from the bearer_list array. When bearer accesses
        node, it can iterate the node_htable hash list with the node
        address to find the corresponding node.
      
      In the new locking policy, every component has its private locking
      solution and the relationship between bearer and node is very simple,
      that is, they can find each other with node address or bearer identity
      from node_htable hash list or bearer_list array.
      
      Until now above all changes have been done, so tipc_net_lock can be
      removed safely.
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Reviewed-by: NJon Maloy <jon.maloy@ericsson.com>
      Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
      Tested-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7216cd94
  2. 20 8月, 2012 1 次提交
  3. 14 3月, 2011 4 次提交
    • A
      tipc: manually inline net_start/stop, make assoc. vars static · 34e46258
      Allan Stephens 提交于
      Relocates network-related variables into the subsystem files where
      they are now primarily used (following the recent rework of TIPC's
      node table), and converts globals into locals where possible. Changes
      the initialization of tipc_num_links from run-time to compile-time,
      and eliminates the net_start routine that becomes empty as a result.
      Also eliminates the corresponding net_stop routine by moving its
      (trivial) content into the one location that called the routine.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      34e46258
    • A
      tipc: Convert node object array to a hash table · 672d99e1
      Allan Stephens 提交于
      Replaces the dynamically allocated array of pointers to the cluster's
      node objects with a static hash table. Hash collisions are resolved
      using chaining, with a typical hash chain having only a single node,
      to avoid degrading performance during processing of incoming packets.
      The conversion to a hash table reduces the memory requirements for
      TIPC's node table to approximately the same size it had prior to
      the previous commit.
      
      In addition to the hash table itself, TIPC now also maintains a
      linked list for the node objects, sorted by ascending network address.
      This list allows TIPC to continue sending responses to user space
      applications that request node and link information in sorted order.
      The list also improves performance when name table update messages are
      sent by making it easier to identify the nodes that must be notified.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      672d99e1
    • A
      tipc: Split up unified structure of network-related variables · d1bcb115
      Allan Stephens 提交于
      Converts the fields of the global "tipc_net" structure into individual
      variables.  Since the struct was never referenced as a complete unit,
      its existence was pointless.  This will facilitate upcoming changes to
      TIPC's node table and simpify upcoming relocation of the variables so
      they are only visible to the files that actually use them.
      
      This change is essentially cosmetic in nature, and doesn't affect the
      operation of TIPC.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      d1bcb115
    • A
      tipc: Fix problem with missing link in "tipc-config -l" output · 9df3b7eb
      Allan Stephens 提交于
      Removes a race condition that could cause TIPC's internal counter
      of the number of links it has to neighboring nodes to have the
      incorrect value if two independent threads of control simultaneously
      create new link endpoints connecting to two different nodes using two
      different bearers. Such under counting would result in TIPC failing to
      list the final link(s) in its response to a configuration request to
      list all of the node's links. The counter is now updated atomically
      to ensure that simultaneous increments do not interfere with each
      other.
      
      Thanks go to Peter Butler <pbutler@pt.com> for his assistance in
      diagnosing and fixing this problem.
      Signed-off-by: NAllan Stephens <Allan.Stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      9df3b7eb
  4. 02 1月, 2011 3 次提交
  5. 03 9月, 2008 1 次提交
  6. 22 5月, 2008 1 次提交
  7. 11 2月, 2007 1 次提交
  8. 18 1月, 2006 1 次提交
  9. 13 1月, 2006 4 次提交