1. 03 8月, 2007 1 次提交
    • D
      [TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg(). · 3516ffb0
      David S. Miller 提交于
      As discovered by Evegniy Polyakov, if we try to sendmsg after
      a connection reset, we can do incredibly stupid things.
      
      The core issue is that inet_sendmsg() tries to autobind the
      socket, but we should never do that for TCP.  Instead we should
      just go straight into TCP's sendmsg() code which will do all
      of the necessary state and pending socket error checks.
      
      TCP's sendpage already directly vectors to tcp_sendpage(), so this
      merely brings sendmsg() in line with that.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3516ffb0
  2. 11 7月, 2007 1 次提交
    • H
      [TCPv4]: Improve BH latency in /proc/net/tcp · a7ab4b50
      Herbert Xu 提交于
      Currently the code for /proc/net/tcp disable BH while iterating
      over the entire established hash table.  Even though we call
      cond_resched_softirq for each entry, we still won't process
      softirq's as regularly as we would otherwise do which results
      in poor performance when the system is loaded near capacity.
      
      This anomaly comes from the 2.4 code where this was all in a
      single function and the local_bh_disable might have made sense
      as a small optimisation.
      
      The cost of each local_bh_disable is so small when compared
      against the increased latency in keeping it disabled over a
      large but mostly empty TCP established hash table that we
      should just move it to the individual read_lock/read_unlock
      calls as we do in inet_diag.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7ab4b50
  3. 13 6月, 2007 1 次提交
  4. 08 6月, 2007 1 次提交
  5. 04 6月, 2007 1 次提交
  6. 26 4月, 2007 10 次提交
  7. 11 2月, 2007 1 次提交
  8. 09 2月, 2007 3 次提交
    • E
      [NET]: change layout of ehash table · dbca9b27
      Eric Dumazet 提交于
      ehash table layout is currently this one :
      
      First half of this table is used by sockets not in TIME_WAIT state
      Second half of it is used by sockets in TIME_WAIT state.
      
      This is non optimal because of for a given hash or socket, the two chain heads 
      are located in separate cache lines.
      Moreover the locks of the second half are never used.
      
      If instead of this halving, we use two list heads in inet_ehash_bucket instead 
      of only one, we probably can avoid one cache miss, and reduce ram usage, 
      particularly if sizeof(rwlock_t) is big (various CONFIG_DEBUG_SPINLOCK, 
      CONFIG_DEBUG_LOCK_ALLOC settings). So we still halves the table but we keep 
      together related chains to speedup lookups and socket state change.
      
      In this patch I did not try to align struct inet_ehash_bucket, but a future 
      patch could try to make this structure have a convenient size (a power of two 
      or a multiple of L1_CACHE_SIZE).
      I guess rwlock will just vanish as soon as RCU is plugged into ehash :) , so 
      maybe we dont need to scratch our heads to align the bucket...
      
      Note : In case struct inet_ehash_bucket is not a power of two, we could 
      probably change alloc_large_system_hash() (in case it use __get_free_pages()) 
      to free the unused space. It currently allocates a big zone, but the last 
      quarter of it could be freed. Again, this should be a temporary 'problem'.
      
      Patch tested on ipv4 tcp only, but should be OK for IPV6 and DCCP.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dbca9b27
    • D
      [IPV4/IPV6]: Always wait for IPSEC SA resolution in socket contexts. · 8eb9086f
      David S. Miller 提交于
      Do this even for non-blocking sockets.  This avoids the silly -EAGAIN
      that applications can see now, even for non-blocking sockets in some
      cases (f.e. connect()).
      
      With help from Venkat Tekkirala.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8eb9086f
    • F
      [TCP]: remove tcp header from tcp_v4_check (take #2) · ba7808ea
      Frederik Deweerdt 提交于
      The tcphdr struct passed to tcp_v4_check is not used, the following
      patch removes it from the parameter list.
      
      This adds the netfilter modifications missing in the patch I sent
      for rc3-mm1.
      Signed-off-by: NFrederik Deweerdt <frederik.deweerdt@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba7808ea
  9. 09 1月, 2007 1 次提交
  10. 18 12月, 2006 2 次提交
  11. 03 12月, 2006 13 次提交
  12. 20 10月, 2006 1 次提交
  13. 12 10月, 2006 2 次提交
  14. 29 9月, 2006 2 次提交