Print this page
916 False-sharing in TCP hash buckets, plus size increase
        (originally Joyent OS-299 tcp_bindi() hash lock contention affects
        TCP client performance)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp.c
          +++ new/usr/src/uts/common/inet/tcp/tcp.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright (c) 2011, Joyent Inc. All rights reserved.
  24   25   */
  25   26  /* Copyright (c) 1990 Mentat Inc. */
  26   27  
  27   28  #include <sys/types.h>
  28   29  #include <sys/stream.h>
  29   30  #include <sys/strsun.h>
  30   31  #include <sys/strsubr.h>
  31   32  #include <sys/stropts.h>
  32   33  #include <sys/strlog.h>
  33   34  #define _SUN_TPI_VERSION 2
↓ open down ↓ 199 lines elided ↑ open up ↑
 233  234  #define TCP_XMIT_LOWATER        4096
 234  235  #define TCP_XMIT_HIWATER        49152
 235  236  #define TCP_RECV_LOWATER        2048
 236  237  #define TCP_RECV_HIWATER        128000
 237  238  
 238  239  #define TIDUSZ  4096    /* transport interface data unit size */
 239  240  
 240  241  /*
 241  242   * Size of acceptor hash list.  It has to be a power of 2 for hashing.
 242  243   */
 243      -#define TCP_ACCEPTOR_FANOUT_SIZE                256
      244 +#define TCP_ACCEPTOR_FANOUT_SIZE                512
 244  245  
 245  246  #ifdef  _ILP32
 246  247  #define TCP_ACCEPTOR_HASH(accid)                                        \
 247  248                  (((uint_t)(accid) >> 8) & (TCP_ACCEPTOR_FANOUT_SIZE - 1))
 248  249  #else
 249  250  #define TCP_ACCEPTOR_HASH(accid)                                        \
 250  251                  ((uint_t)(accid) & (TCP_ACCEPTOR_FANOUT_SIZE - 1))
 251  252  #endif  /* _ILP32 */
 252  253  
 253  254  /*
↓ open down ↓ 4210 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX