Commit 0477d38c authored by Rusty Russell's avatar Rusty Russell Committed by David S. Miller

[NETFILTER]: Don't cacheline align slab allocs

Anton points out that cacheline aligning conntrack entries is a wank.
He's right: there's lots of them, and they're currently ~200 bytes.
Same with the cargo-cult programming in ipt_hashlimit.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c88c4e3
...@@ -1205,7 +1205,7 @@ int __init ip_conntrack_init(void) ...@@ -1205,7 +1205,7 @@ int __init ip_conntrack_init(void)
ip_conntrack_cachep = kmem_cache_create("ip_conntrack", ip_conntrack_cachep = kmem_cache_create("ip_conntrack",
sizeof(struct ip_conntrack), 0, sizeof(struct ip_conntrack), 0,
SLAB_HWCACHE_ALIGN, NULL,NULL); 0, NULL, NULL);
if (!ip_conntrack_cachep) { if (!ip_conntrack_cachep) {
printk(KERN_ERR "Unable to create ip_conntrack slab cache\n"); printk(KERN_ERR "Unable to create ip_conntrack slab cache\n");
goto err_free_hash; goto err_free_hash;
...@@ -1213,7 +1213,7 @@ int __init ip_conntrack_init(void) ...@@ -1213,7 +1213,7 @@ int __init ip_conntrack_init(void)
ip_conntrack_expect_cachep = kmem_cache_create("ip_conntrack_expect", ip_conntrack_expect_cachep = kmem_cache_create("ip_conntrack_expect",
sizeof(struct ip_conntrack_expect), sizeof(struct ip_conntrack_expect),
0, SLAB_HWCACHE_ALIGN, NULL, NULL); 0, 0, NULL, NULL);
if (!ip_conntrack_expect_cachep) { if (!ip_conntrack_expect_cachep) {
printk(KERN_ERR "Unable to create ip_expect slab cache\n"); printk(KERN_ERR "Unable to create ip_expect slab cache\n");
goto err_free_conntrack_slab; goto err_free_conntrack_slab;
......
...@@ -668,11 +668,9 @@ static int init_or_fini(int fini) ...@@ -668,11 +668,9 @@ static int init_or_fini(int fini)
goto cleanup_nothing; goto cleanup_nothing;
} }
/* FIXME: do we really want HWCACHE_ALIGN since our objects are
* quite small ? */
hashlimit_cachep = kmem_cache_create("ipt_hashlimit", hashlimit_cachep = kmem_cache_create("ipt_hashlimit",
sizeof(struct dsthash_ent), 0, sizeof(struct dsthash_ent), 0,
SLAB_HWCACHE_ALIGN, NULL, NULL); 0, NULL, NULL);
if (!hashlimit_cachep) { if (!hashlimit_cachep) {
printk(KERN_ERR "Unable to create ipt_hashlimit slab cache\n"); printk(KERN_ERR "Unable to create ipt_hashlimit slab cache\n");
ret = -ENOMEM; ret = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment