1. 20 Mar, 2015 3 commits
    • Eric Dumazet's avatar
      inet: get rid of central tcp/dccp listener timer · fa76ce73
      Eric Dumazet authored
      One of the major issue for TCP is the SYNACK rtx handling,
      done by inet_csk_reqsk_queue_prune(), fired by the keepalive
      timer of a TCP_LISTEN socket.
      
      This function runs for awful long times, with socket lock held,
      meaning that other cpus needing this lock have to spin for hundred of ms.
      
      SYNACK are sent in huge bursts, likely to cause severe drops anyway.
      
      This model was OK 15 years ago when memory was very tight.
      
      We now can afford to have a timer per request sock.
      
      Timer invocations no longer need to lock the listener,
      and can be run from all cpus in parallel.
      
      With following patch increasing somaxconn width to 32 bits,
      I tested a listener with more than 4 million active request sockets,
      and a steady SYNFLOOD of ~200,000 SYN per second.
      Host was sending ~830,000 SYNACK per second.
      
      This is ~100 times more what we could achieve before this patch.
      
      Later, we will get rid of the listener hash and use ehash instead.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa76ce73
    • Eric Dumazet's avatar
      inet: drop prev pointer handling in request sock · 52452c54
      Eric Dumazet authored
      When request sock are put in ehash table, the whole notion
      of having a previous request to update dl_next is pointless.
      
      Also, following patch will get rid of big purge timer,
      so we want to delete a request sock without holding listener lock.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52452c54
    • Thomas Graf's avatar
      rhashtable: Round up/down min/max_size to ensure we respect limit · a998f712
      Thomas Graf authored
      Round up min_size respectively round down max_size to the next power
      of two to make sure we always respect the limit specified by the
      user. This is required because we compare the table size against the
      limit before we expand or shrink.
      
      Also fixes a minor bug where we modified min_size in the params
      provided instead of the copy stored in struct rhashtable.
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a998f712
  2. 19 Mar, 2015 27 commits
  3. 18 Mar, 2015 10 commits