Index: linux-2.6.21-rc2/fs/dcache.c =================================================================== --- linux-2.6.21-rc2.orig/fs/dcache.c 2007-03-01 13:33:58.000000000 -0800 +++ linux-2.6.21-rc2/fs/dcache.c 2007-03-01 13:35:16.000000000 -0800 @@ -2056,7 +2056,7 @@ static void __init dcache_init(unsigned sizeof(struct dentry), 0, (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| - SLAB_MEM_SPREAD), + SLAB_MEM_SPREAD|SLAB_DESTROY_BY_RCU), NULL, NULL); set_shrinker(DEFAULT_SEEKS, shrink_dcache_memory); Index: linux-2.6.21-rc2/fs/proc/proc_misc.c =================================================================== --- linux-2.6.21-rc2.orig/fs/proc/proc_misc.c 2007-03-01 13:38:17.000000000 -0800 +++ linux-2.6.21-rc2/fs/proc/proc_misc.c 2007-03-01 13:45:52.000000000 -0800 @@ -397,7 +397,22 @@ static const struct file_operations proc }; #endif -#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB) +#ifdef CONFIG_SLUB +extern struct seq_operations slubinfo_op; +static int slubinfo_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &slubinfo_op); +} +static const struct file_operations proc_slabinfo_operations = { + .open = slabinfo_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; +#endif + + +#ifdef CONFIG_SLAB extern struct seq_operations slabinfo_op; extern ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); static int slabinfo_open(struct inode *inode, struct file *file) @@ -407,9 +422,7 @@ static int slabinfo_open(struct inode *i static const struct file_operations proc_slabinfo_operations = { .open = slabinfo_open, .read = seq_read, -#ifdef CONFIG_SLAB .write = slabinfo_write, -#endif .llseek = seq_lseek, .release = seq_release, }; @@ -710,7 +723,10 @@ void __init proc_misc_init(void) #endif create_seq_entry("stat", 0, &proc_stat_operations); create_seq_entry("interrupts", 0, &proc_interrupts_operations); -#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB) +#ifdef CONFIG_SLUB + create_seq_entry("slubinfo",S_IWUSR|S_IRUGO,&proc_slubinfo_operations); +#endif +#ifdef CONFIG_SLAB create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations); #ifdef CONFIG_DEBUG_SLAB_LEAK create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations); Index: linux-2.6.21-rc2/mm/slub.c =================================================================== --- linux-2.6.21-rc2.orig/mm/slub.c 2007-03-01 13:40:51.000000000 -0800 +++ linux-2.6.21-rc2/mm/slub.c 2007-03-01 13:44:34.000000000 -0800 @@ -1811,7 +1811,7 @@ void __init kmem_cache_init(void) kmem_size = offsetof(struct kmem_cache, cpu_slab) + nr_cpu_ids * sizeof(struct page *); - printk("SLUB V3.2: General Slabs=%d, HW alignment=%d, Processors=%d, Nodes=%d\n", + printk(KERN_INFO "SLUB V3.2: General Slabs=%d, HW alignment=%d, Processors=%d, Nodes=%d\n", KMALLOC_SHIFT_HIGH + KMALLOC_EXTRAS + 1 - KMALLOC_SHIFT_LOW, L1_CACHE_BYTES, nr_cpu_ids, nr_node_ids); } @@ -1938,7 +1938,7 @@ static void unregister_slab(struct kmem_ up_write(&slabstat_sem); } -static void print_slabinfo_header(struct seq_file *m) +static void print_slubinfo_header(struct seq_file *m) { /* * Output format version, so at least we can change it @@ -1960,7 +1960,7 @@ static void *s_start(struct seq_file *m, down_read(&slabstat_sem); if (!n) - print_slabinfo_header(m); + print_slubinfo_header(m); p = slab_caches.next; while (n--) { p = p->next;