summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c7
-rw-r--r--fs/dcache.c3
-rw-r--r--fs/inode.c9
-rw-r--r--fs/xfs/linux-2.6/kmem.h2
4 files changed, 15 insertions, 6 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 0d6ca7bac6c8..36c7253bea72 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3143,8 +3143,11 @@ void __init buffer_init(void)
int nrpages;
bh_cachep = kmem_cache_create("buffer_head",
- sizeof(struct buffer_head), 0,
- SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_buffer_head, NULL);
+ sizeof(struct buffer_head), 0,
+ (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
+ SLAB_MEM_SPREAD),
+ init_buffer_head,
+ NULL);
/*
* Limit the bh occupancy to 10% of ZONE_NORMAL
diff --git a/fs/dcache.c b/fs/dcache.c
index 11dc83092d4a..653f64ce98e2 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1682,7 +1682,8 @@ static void __init dcache_init(unsigned long mempages)
dentry_cache = kmem_cache_create("dentry_cache",
sizeof(struct dentry),
0,
- SLAB_RECLAIM_ACCOUNT|SLAB_PANIC,
+ (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
+ SLAB_MEM_SPREAD),
NULL, NULL);
set_shrinker(DEFAULT_SEEKS, shrink_dcache_memory);
diff --git a/fs/inode.c b/fs/inode.c
index 25967b67903d..a51c671c54cf 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1375,8 +1375,13 @@ void __init inode_init(unsigned long mempages)
int loop;
/* inode slab cache */
- inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode),
- 0, SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_once, NULL);
+ inode_cachep = kmem_cache_create("inode_cache",
+ sizeof(struct inode),
+ 0,
+ (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
+ SLAB_MEM_SPREAD),
+ init_once,
+ NULL);
set_shrinker(DEFAULT_SEEKS, shrink_icache_memory);
/* Hash may have been set up in inode_init_early */
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h
index f0268a84e6fd..2cfd33d4d8aa 100644
--- a/fs/xfs/linux-2.6/kmem.h
+++ b/fs/xfs/linux-2.6/kmem.h
@@ -100,7 +100,7 @@ extern void kmem_free(void *, size_t);
#define KM_ZONE_HWALIGN SLAB_HWCACHE_ALIGN
#define KM_ZONE_RECLAIM SLAB_RECLAIM_ACCOUNT
-#define KM_ZONE_SPREAD 0
+#define KM_ZONE_SPREAD SLAB_MEM_SPREAD
#define kmem_zone kmem_cache
#define kmem_zone_t struct kmem_cache