RDS/IB: Use SLAB_HWCACHE_ALIGN flag for kmem_cache_create()
authorAndy Grover <andy.grover@oracle.com>
Wed, 7 Jul 2010 23:46:26 +0000 (16:46 -0700)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:16:38 +0000 (18:16 -0700)
We are *definitely* counting cycles as closely as DaveM, so
ensure hwcache alignment for our recv ring control structs.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/ib_recv.c

index 9c4208f6b45154e3b4d393390b1a4ffe28e84342..37dab2898ad013bc6f9aec091935bc6a891e790d 100644 (file)
@@ -1051,13 +1051,13 @@ int __init rds_ib_recv_init(void)
 
        rds_ib_incoming_slab = kmem_cache_create("rds_ib_incoming",
                                        sizeof(struct rds_ib_incoming),
-                                       0, 0, NULL);
+                                       0, SLAB_HWCACHE_ALIGN, NULL);
        if (!rds_ib_incoming_slab)
                goto out;
 
        rds_ib_frag_slab = kmem_cache_create("rds_ib_frag",
                                        sizeof(struct rds_page_frag),
-                                       0, 0, NULL);
+                                       0, SLAB_HWCACHE_ALIGN, NULL);
        if (!rds_ib_frag_slab)
                kmem_cache_destroy(rds_ib_incoming_slab);
        else