提交 e422fd2c 编写于 作者: A Andrea Arcangeli 提交者: Linus Torvalds

[PATCH] avoid -ENOMEM due reclaimable slab caches

This makes sure that reclaimable buffer headers and reclaimable inodes
are accounted properly during the overcommit checks.
Signed-off-by: NAndrea Arcangeli <andrea@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f48d9663
...@@ -3115,7 +3115,7 @@ void __init buffer_init(void) ...@@ -3115,7 +3115,7 @@ void __init buffer_init(void)
bh_cachep = kmem_cache_create("buffer_head", bh_cachep = kmem_cache_create("buffer_head",
sizeof(struct buffer_head), 0, sizeof(struct buffer_head), 0,
SLAB_PANIC, init_buffer_head, NULL); SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_buffer_head, NULL);
/* /*
* Limit the bh occupancy to 10% of ZONE_NORMAL * Limit the bh occupancy to 10% of ZONE_NORMAL
......
...@@ -1336,7 +1336,7 @@ void __init inode_init(unsigned long mempages) ...@@ -1336,7 +1336,7 @@ void __init inode_init(unsigned long mempages)
/* inode slab cache */ /* inode slab cache */
inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode), inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode),
0, SLAB_PANIC, init_once, NULL); 0, SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_once, NULL);
set_shrinker(DEFAULT_SEEKS, shrink_icache_memory); set_shrinker(DEFAULT_SEEKS, shrink_icache_memory);
/* Hash may have been set up in inode_init_early */ /* Hash may have been set up in inode_init_early */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册