1. 09 Sep, 2010 5 commits
    • Zach Brown's avatar
      RDS: remove __init and __exit annotation · ef87b7ea
      Zach Brown authored
      
      The trivial amount of memory saved isn't worth the cost of dealing with section
      mismatches.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      ef87b7ea
    • Zach Brown's avatar
      RDS: return to a single-threaded krdsd · 80c51be5
      Zach Brown authored
      
      We were seeing very nasty bugs due to fundamental assumption the current code
      makes about concurrent work struct processing.  The code simpy isn't able to
      handle concurrent connection shutdown work function execution today, for
      example, which is very much possible once a multi-threaded krdsd was
      introduced.  The problem compounds as additional work structs are added to the
      mix.
      
      krdsd is no longer perforance critical now that send and receive posting and
      FMR flushing are done elsewhere, so the safest fix is to move back to the
      single threaded krdsd that the current code was built around.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      80c51be5
    • Zach Brown's avatar
      rds: fix rds_send_xmit() serialization · 0f4b1c7e
      Zach Brown authored
      
      rds_send_xmit() was changed to hold an interrupt masking spinlock instead of a
      mutex so that it could be called from the IB receive tasklet path.  This broke
      the TCP transport because its xmit method can block and masks and unmasks
      interrupts.
      
      This patch serializes callers to rds_send_xmit() with a simple bit instead of
      the current spinlock or previous mutex.  This enables rds_send_xmit() to be
      called from any context and to call functions which block.  Getting rid of the
      c_send_lock exposes the bare c_lock acquisitions which are changed to block
      interrupts.
      
      A waitqueue is added so that rds_conn_shutdown() can wait for callers to leave
      rds_send_xmit() before tearing down partial send state.  This lets us get rid
      of c_senders.
      
      rds_send_xmit() is changed to check the conn state after acquiring the
      RDS_IN_XMIT bit to resolve races with the shutdown path.  Previously both
      worked with the conn state and then the lock in the same order, allowing them
      to race and execute the paths concurrently.
      
      rds_send_reset() isn't racing with rds_send_xmit() now that rds_conn_shutdown()
      properly ensures that rds_send_xmit() can't start once the conn state has been
      changed.  We can remove its previous use of the spinlock.
      
      Finally, c_send_generation is redundant.  Callers can race to test the c_flags
      bit by simply retrying instead of racing to test the c_send_generation atomic.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      0f4b1c7e
    • Andy Grover's avatar
      RDS: cleanup: remove "== NULL"s and "!= NULL"s in ptr comparisons · 8690bfa1
      Andy Grover authored
      
      Favor "if (foo)" style over "if (foo != NULL)".
      Signed-off-by: default avatarAndy Grover <andy.grover@oracle.com>
      8690bfa1
    • Andy Grover's avatar
      RDS: move rds_shutdown_worker impl. to rds_conn_shutdown · 2dc39357
      Andy Grover authored
      
      This fits better in connection.c, rather than threads.c.
      Signed-off-by: default avatarAndy Grover <andy.grover@oracle.com>
      2dc39357
  2. 17 Mar, 2010 1 commit
  3. 30 Nov, 2009 1 commit
  4. 24 Aug, 2009 1 commit
  5. 27 Feb, 2009 1 commit
    • Andy Grover's avatar
      RDS: Connection handling · 00e0f34c
      Andy Grover authored
      
      While arguably the fact that the underlying transport needs a
      connection to convey RDS's datagrame reliably is not important
      to rds proper, the transports implemented so far (IB and TCP)
      have both been connection-oriented, and so the connection
      state machine-related code is in the common rds code.
      
      This patch also includes several work items, to handle connecting,
      sending, receiving, and shutdown.
      Signed-off-by: default avatarAndy Grover <andy.grover@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00e0f34c