1. 24 8月, 2014 2 次提交
    • J
      tipc: remove port_lock · 6c9808ce
      Jon Paul Maloy 提交于
      In previous commits we have reduced usage of port_lock to a minimum,
      and complemented it with usage of bh_lock_sock() at the remaining
      locations. The purpose has been to remove this lock altogether, since
      it largely duplicates the role of bh_lock_sock. We are now ready to do
      this.
      
      However, we still need to protect the BH callers from inadvertent
      release of the socket while they hold a reference to it. We do this by
      replacing port_lock by a combination of a rw-lock protecting the
      reference table as such, and updating the socket reference counter while
      the socket is referenced from BH. This technique is more standard and
      comprehensible than the previous approach, and turns out to have a
      positive effect on overall performance.
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c9808ce
    • J
      tipc: use registry when scanning sockets · 5a9ee0be
      Jon Paul Maloy 提交于
      The functions tipc_port_get_ports() and tipc_port_reinit() scan over
      all sockets/ports to access each of them. This is done by using a
      dedicated linked list, 'tipc_socks' where all sockets are members. The
      list is in turn protected by a spinlock, 'port_list_lock', while each
      socket is locked by using port_lock at the moment of access.
      
      In order to reduce complexity and risk of deadlock, we want to get
      rid of the linked list and the accompanying spinlock.
      
      This is what we do in this commit. Instead of the linked list, we use
      the port registry to scan across the sockets. We also add usage of
      bh_lock_sock() inside the scope of port_lock in both functions, as a
      preparation for the complete removal of port_lock.
      
      Finally, we move the functions from port.c to socket.c, and rename them
      to tipc_sk_sock_show() and tipc_sk_reinit() repectively.
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a9ee0be
  2. 13 3月, 2014 1 次提交
  3. 17 10月, 2010 1 次提交
  4. 17 4月, 2008 1 次提交
  5. 11 2月, 2007 1 次提交
  6. 21 3月, 2006 1 次提交
  7. 18 1月, 2006 1 次提交
  8. 13 1月, 2006 4 次提交