Commit:     03d4f879b9ddf7d5c1f788792247e62450342eed
Parent:     4103f8cd5c1f260d674a7b426ed221812de54d47
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 27 14:18:34 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:28:20 2007 -0700

    [IPV4]: align inet_protos[] on SMP
    As IPPROTO_TCP is 6, it makes sense to make sure inet_protos[] array
    is properly cache line aligned to avoid false sharing on SMP.
    c0680540 b peer_total
    c0680544 b inet_peer_unused_head
    c0680560 B inet_protos
    On i386 this example, we can see that inet_protos[IPPROTO_TCP] shares
    a potentially hot (and modified) cache line.
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/ipv4/protocol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/protocol.c b/net/ipv4/protocol.c
index da70fef..971ab93 100644
--- a/net/ipv4/protocol.c
+++ b/net/ipv4/protocol.c
@@ -45,7 +45,7 @@
 #include <net/ipip.h>
 #include <linux/igmp.h>
-struct net_protocol *inet_protos[MAX_INET_PROTOS];
+struct net_protocol *inet_protos[MAX_INET_PROTOS] ____cacheline_aligned_in_smp;
 static DEFINE_SPINLOCK(inet_proto_lock);
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