Commit:     4103f8cd5c1f260d674a7b426ed221812de54d47
Parent:     73417f617a93cf30342c3ea41abc38927bd467aa
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 27 13:58:31 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:28:19 2007 -0700

    [TCP]: tcp_memory_pressure and tcp_socket are__read_mostly candidates
    tcp_memory_pressure and tcp_socket currently share a cache line with 
tcp_memory_allocated, tcp_sockets_allocated.
    (Very hot cache line)
    It makes sense to declare these variables as __read_mostly, to avoid false 
sharing on SMP.
    ffffffff8081d9c0 B tcp_orphan_count
    ffffffff8081d9c4 B tcp_memory_allocated
    ffffffff8081d9c8 B tcp_sockets_allocated
    ffffffff8081d9cc B tcp_memory_pressure
    ffffffff8081d9d0 b tcp_md5sig_users
    ffffffff8081d9d8 b tcp_md5sig_pool
    ffffffff8081d9e0 b warntime.31570
    ffffffff8081d9e8 b tcp_socket
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/ipv4/tcp.c      |    2 +-
 net/ipv4/tcp_ipv4.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 18a09a7..bb9d91a 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -297,7 +297,7 @@ EXPORT_SYMBOL(tcp_sockets_allocated);
  * All the sk_stream_mem_schedule() is of this nature: accounting
  * is strict, actions are advisory and have some latency.
-int tcp_memory_pressure;
+int tcp_memory_pressure __read_mostly;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 617a5e4..e11eaf4 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -88,7 +88,7 @@ int sysctl_tcp_low_latency __read_mostly;
 #define ICMP_MIN_LENGTH 8
 /* Socket used for sending RSTs */
-static struct socket *tcp_socket;
+static struct socket *tcp_socket __read_mostly;
 void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to