netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: netdev@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	yanmin_zhang@linux.intel.com, David Miller <davem@davemloft.net>,
	Christoph Lameter <clameter@engr.sg
Subject: [rfc][patch 3/3] use SLAB_ALIGN_SMP
Date: Mon, 3 Mar 2008 10:36:24 +0100	[thread overview]
Message-ID: <20080303093624.GC15091@wotan.suse.de> (raw)
In-Reply-To: <20080303093449.GA15091@wotan.suse.de>

Use SLAB_SMP_ALIGN in a few places.

Signed-off-by: Nick Piggin <npiggin@suse.de>
---
Index: linux-2.6/fs/block_dev.c
===================================================================
--- linux-2.6.orig/fs/block_dev.c
+++ linux-2.6/fs/block_dev.c
@@ -332,8 +332,8 @@ void __init bdev_cache_init(void)
 {
 	int err;
 	bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode),
-			0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
-				SLAB_MEM_SPREAD|SLAB_PANIC),
+			0, (SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|
+			SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_PANIC),
 			init_once);
 	err = register_filesystem(&bd_type);
 	if (err)
Index: linux-2.6/kernel/fork.c
===================================================================
--- linux-2.6.orig/kernel/fork.c
+++ linux-2.6/kernel/fork.c
@@ -1547,23 +1547,23 @@ void __init proc_caches_init(void)
 {
 	sighand_cachep = kmem_cache_create("sighand_cache",
 			sizeof(struct sighand_struct), 0,
-			SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU,
+			SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU,
 			sighand_ctor);
 	signal_cachep = kmem_cache_create("signal_cache",
 			sizeof(struct signal_struct), 0,
-			SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
+			SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|SLAB_PANIC, NULL);
 	files_cachep = kmem_cache_create("files_cache",
 			sizeof(struct files_struct), 0,
-			SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
+			SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|SLAB_PANIC, NULL);
 	fs_cachep = kmem_cache_create("fs_cache",
 			sizeof(struct fs_struct), 0,
-			SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
+			SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|SLAB_PANIC, NULL);
 	vm_area_cachep = kmem_cache_create("vm_area_struct",
 			sizeof(struct vm_area_struct), 0,
 			SLAB_PANIC, NULL);
 	mm_cachep = kmem_cache_create("mm_struct",
 			sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
-			SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
+			SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|SLAB_PANIC, NULL);
 }
 
 /*
Index: linux-2.6/kernel/pid.c
===================================================================
--- linux-2.6.orig/kernel/pid.c
+++ linux-2.6/kernel/pid.c
@@ -526,5 +526,5 @@ void __init pidmap_init(void)
 	atomic_dec(&init_pid_ns.pidmap[0].nr_free);
 
 	init_pid_ns.pid_cachep = KMEM_CACHE(pid,
-			SLAB_HWCACHE_ALIGN | SLAB_PANIC);
+			SLAB_HWCACHE_ALIGN | SLAB_SMP_ALIGN | SLAB_PANIC);
 }
Index: linux-2.6/kernel/user.c
===================================================================
--- linux-2.6.orig/kernel/user.c
+++ linux-2.6/kernel/user.c
@@ -503,7 +503,7 @@ static int __init uid_cache_init(void)
 	int n;
 
 	uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct),
-			0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
+			0, SLAB_HWCACHE_ALIGN|SLAB_SMP_ALIGN|SLAB_PANIC, NULL);
 
 	for(n = 0; n < UIDHASH_SZ; ++n)
 		INIT_HLIST_HEAD(init_user_ns.uidhash_table + n);

  parent reply	other threads:[~2008-03-03  9:36 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03  9:34 [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment Nick Piggin
2008-03-03  9:35 ` [rfc][patch 2/3] slab: introduce SMP alignment Nick Piggin
2008-03-03 19:06   ` Christoph Lameter
2008-03-03 20:03     ` Nick Piggin
2008-03-03 20:09       ` Christoph Lameter
2008-03-03 20:12         ` Nick Piggin
2008-03-03 20:17           ` Christoph Lameter
2008-03-03 20:24             ` Nick Piggin
2008-03-03 20:41               ` Pekka Enberg
2008-03-03 21:23                 ` Christoph Lameter
2008-03-03 21:31               ` Christoph Lameter
2008-03-05  0:16                 ` Nick Piggin
2008-03-07  4:37                 ` Nick Piggin
2008-03-07  5:11                   ` Christoph Lameter
2008-03-07  5:19                     ` Nick Piggin
2008-03-07  5:26                       ` Christoph Lameter
2008-03-07  5:37                         ` Nick Piggin
2008-03-11  7:13                         ` Nick Piggin
2008-03-12  6:21                           ` Christoph Lameter
2008-03-03  9:36 ` Nick Piggin [this message]
2008-03-03  9:53   ` [rfc][patch 3/3] use SLAB_ALIGN_SMP Eric Dumazet
2008-03-03 12:41     ` Nick Piggin
2008-03-03 13:00       ` Eric Dumazet
2008-03-03 13:46         ` Nick Piggin
2008-03-03 13:53           ` Pekka Enberg
2008-03-03 14:15             ` Eric Dumazet
2008-03-03 19:10               ` Christoph Lameter
2008-03-03 19:09             ` Christoph Lameter
2008-03-03 20:10               ` Nick Piggin
2008-03-03 20:12                 ` Christoph Lameter
2008-03-03 20:18                   ` Nick Piggin
2008-03-03 21:14                     ` Christoph Lameter
2008-03-03  9:44 ` [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment Pekka Enberg
2008-03-03 12:28   ` Nick Piggin
2008-03-03 19:08 ` Christoph Lameter
2008-03-03 20:06   ` Nick Piggin
2008-03-03 20:10     ` Christoph Lameter
2008-03-03 20:17       ` Nick Piggin
2008-03-03 21:16         ` Christoph Lameter
2008-03-03 21:30           ` Pekka Enberg
2008-03-03 21:32             ` Christoph Lameter
2008-03-03 21:35               ` Pekka Enberg
2008-03-05  0:28                 ` Nick Piggin
2008-03-05 20:56                   ` Christoph Lameter
2008-03-06  2:49                     ` Nick Piggin
2008-03-06 22:53                       ` Christoph Lameter
2008-03-07  2:04                         ` Nick Piggin
2008-03-07  2:20                           ` Christoph Lameter
2008-03-07  2:25                             ` Nick Piggin
2008-03-07  2:27                               ` Christoph Lameter
2008-03-07  2:33                                 ` Nick Piggin
2008-03-07  2:33                                   ` Christoph Lameter
2008-03-07  5:23                                     ` Nick Piggin
2008-03-05  0:08               ` Nick Piggin
2008-03-05  0:06           ` Nick Piggin
2008-03-05  0:10             ` David Miller
2008-03-05 21:06               ` Christoph Lameter
2008-03-06  2:57                 ` Nick Piggin
2008-03-06 22:56                   ` Christoph Lameter
2008-03-07  2:23                     ` Nick Piggin
2008-03-07  2:26                       ` Christoph Lameter
2008-03-07  2:32                         ` Nick Piggin
2008-03-07  2:54                           ` Christoph Lameter
2008-03-07  3:10                             ` Nick Piggin
2008-03-07  3:18                               ` Christoph Lameter
2008-03-07  3:22                                 ` Nick Piggin
2008-03-07  3:58                                   ` Christoph Lameter
2008-03-07  4:05                                     ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080303093624.GC15091@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=clameter@engr.sg \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yanmin_zhang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).