1. 08 3月, 2007 1 次提交
  2. 07 3月, 2007 2 次提交
  3. 01 3月, 2007 1 次提交
  4. 15 2月, 2007 2 次提交
  5. 13 2月, 2007 1 次提交
  6. 11 2月, 2007 1 次提交
  7. 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
    • A
      [DCCP]: Warning fixes. · 0f08461e
      Andrew Morton 提交于
      net/dccp/ccids/ccid3.c: In function `ccid3_hc_rx_packet_recv':
      net/dccp/ccids/ccid3.c:1007: warning: long int format, different type arg (arg 3)
      net/dccp/ccids/ccid3.c:1007: warning: long int format, different type arg (arg 4)
      
      opaque types must be suitably cast for printing.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0f08461e
    • 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
  8. 26 1月, 2007 1 次提交
  9. 14 12月, 2006 1 次提交
  10. 12 12月, 2006 23 次提交
  11. 08 12月, 2006 2 次提交
  12. 04 12月, 2006 2 次提交
    • G
      [DCCP] tfrc: Binary search for reverse TFRC lookup · 2bbf29ac
      Gerrit Renker 提交于
      This replaces the linear search algorithm for reverse lookup with
      binary search.
      
      It has the advantage of better scalability: O(log2(N)) instead of O(N).
      This means that the average number of iterations is reduced from 250
      (linear search if each value appears equally likely) down to at most 9.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      2bbf29ac
    • G
      [DCCP] ccid3: Deprecate TFRC_SMALLEST_P · 44158306
      Gerrit Renker 提交于
       This patch deprecates the existing use of an arbitrary value TFRC_SMALLEST_P
       for low-threshold values of p. This avoids masking low-resolution errors.
       Instead, the code now checks against real boundaries (implemented by preceding
       patch) and provides warnings whenever a real value falls below the threshold.
      
       If such messages are observed, it is a better solution to take this as an
       indication that the lookup table needs to be re-engineered.
      
      Changelog:
      ----------
       This patch
         * makes handling all TFRC resolution errors local to the TFRC library
      
         * removes unnecessary test whether X_calc is 'infinity' due to p==0 -- this
           condition is already caught by tfrc_calc_x()
      
         * removes setting ccid3hctx_p = TFRC_SMALLEST_P in ccid3_hc_tx_packet_recv
           since this is now done by the TFRC library
      
         * updates BUG_ON test in ccid3_hc_tx_no_feedback_timer to take into account
           that p now is either 0 (and then X_calc is irrelevant), or it is > 0; since
           the handling of TFRC_SMALLEST_P is now taken care of in the tfrc library
      
      Justification:
      --------------
       The TFRC code uses a lookup table which has a bounded resolution.
       The lowest possible value of the loss event rate `p' which can be
       resolved is currently 0.0001.  Substituting this lower threshold for
       p when p is less than 0.0001 results in a huge, exponentially-growing
       error.  The error can be computed by the following formula:
      
          (f(0.0001) - f(p))/f(p) * 100      for p < 0.0001
      
       Currently the solution is to use an (arbitrary) value
           TFRC_SMALLEST_P  =   40 * 1E-6   =   0.00004
       and to consider all values below this value as `virtually zero'.  Due to
       the exponentially growing resolution error, this is not a good idea, since
       it hides the fact that the table can not resolve practically occurring cases.
       Already at p == TFRC_SMALLEST_P, the error is as high as 58.19%!
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      44158306