summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 6774e6b2e96d..51915842f1c0 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -300,9 +300,9 @@ void __init fork_init(void)
300#define ARCH_MIN_TASKALIGN L1_CACHE_BYTES 300#define ARCH_MIN_TASKALIGN L1_CACHE_BYTES
301#endif 301#endif
302 /* create a slab on which task_structs can be allocated */ 302 /* create a slab on which task_structs can be allocated */
303 task_struct_cachep = 303 task_struct_cachep = kmem_cache_create("task_struct",
304 kmem_cache_create("task_struct", arch_task_struct_size, 304 arch_task_struct_size, ARCH_MIN_TASKALIGN,
305 ARCH_MIN_TASKALIGN, SLAB_PANIC | SLAB_NOTRACK, NULL); 305 SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, NULL);
306#endif 306#endif
307 307
308 /* do the arch specific task caches init */ 308 /* do the arch specific task caches init */
@@ -1848,16 +1848,19 @@ void __init proc_caches_init(void)
1848 sighand_cachep = kmem_cache_create("sighand_cache", 1848 sighand_cachep = kmem_cache_create("sighand_cache",
1849 sizeof(struct sighand_struct), 0, 1849 sizeof(struct sighand_struct), 0,
1850 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU| 1850 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU|
1851 SLAB_NOTRACK, sighand_ctor); 1851 SLAB_NOTRACK|SLAB_ACCOUNT, sighand_ctor);
1852 signal_cachep = kmem_cache_create("signal_cache", 1852 signal_cachep = kmem_cache_create("signal_cache",
1853 sizeof(struct signal_struct), 0, 1853 sizeof(struct signal_struct), 0,
1854 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL); 1854 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT,
1855 NULL);
1855 files_cachep = kmem_cache_create("files_cache", 1856 files_cachep = kmem_cache_create("files_cache",
1856 sizeof(struct files_struct), 0, 1857 sizeof(struct files_struct), 0,
1857 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL); 1858 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT,
1859 NULL);
1858 fs_cachep = kmem_cache_create("fs_cache", 1860 fs_cachep = kmem_cache_create("fs_cache",
1859 sizeof(struct fs_struct), 0, 1861 sizeof(struct fs_struct), 0,
1860 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL); 1862 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT,
1863 NULL);
1861 /* 1864 /*
1862 * FIXME! The "sizeof(struct mm_struct)" currently includes the 1865 * FIXME! The "sizeof(struct mm_struct)" currently includes the
1863 * whole struct cpumask for the OFFSTACK case. We could change 1866 * whole struct cpumask for the OFFSTACK case. We could change
@@ -1867,8 +1870,9 @@ void __init proc_caches_init(void)
1867 */ 1870 */
1868 mm_cachep = kmem_cache_create("mm_struct", 1871 mm_cachep = kmem_cache_create("mm_struct",
1869 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, 1872 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
1870 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL); 1873 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT,
1871 vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC); 1874 NULL);
1875 vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT);
1872 mmap_init(); 1876 mmap_init();
1873 nsproxy_cache_init(); 1877 nsproxy_cache_init();
1874} 1878}