diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2011-04-21 20:06:37 -0400 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2011-04-21 20:06:37 -0400 |
commit | aec2a073cb6e147203523e22c65a90f3f736f08c (patch) | |
tree | 8fa166a08d967558f12e118123d21459df91e97a /usr/src/uts/common/inet/tcp.h | |
parent | 5a74db2d25b207135db8a909479fc4fb8a27b15d (diff) | |
download | illumos-joyent-aec2a073cb6e147203523e22c65a90f3f736f08c.tar.gz |
916 False-sharing in TCP hash buckets, plus size increase
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/uts/common/inet/tcp.h')
-rw-r--r-- | usr/src/uts/common/inet/tcp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/src/uts/common/inet/tcp.h b/usr/src/uts/common/inet/tcp.h index cbf07edce8..460f183884 100644 --- a/usr/src/uts/common/inet/tcp.h +++ b/usr/src/uts/common/inet/tcp.h @@ -20,6 +20,7 @@ */ /* * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ /* Copyright (c) 1990 Mentat Inc. */ @@ -496,6 +497,9 @@ extern void *tcp_get_conn(void *arg, tcp_stack_t *); extern mblk_t *tcp_snmp_get(queue_t *, mblk_t *, boolean_t); extern int tcp_snmp_set(queue_t *, int, int, uchar_t *, int len); +/* Pad for the tf_t structure to avoid false cache line sharing. */ +#define TF_CACHEL_PAD 64 + /* * The TCP Fanout structure for bind and acceptor hashes. * The hash tables and their linkage (tcp_*_hash, tcp_ptp*hn) are @@ -508,6 +512,8 @@ extern int tcp_snmp_set(queue_t *, int, int, uchar_t *, int len); typedef struct tf_s { tcp_t *tf_tcp; kmutex_t tf_lock; + unsigned char tf_pad[TF_CACHEL_PAD - + (sizeof (tcp_t *) + sizeof (kmutex_t))]; } tf_t; |