提交 43c0f3d2 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

Fix: find_or_create_page skips cpuset memory spreading.

We call alloc_page where we should be calling __page_cache_alloc.

__page_cache_alloc performs cpuset memory spreading.  alloc_page does not.
There is no reason that pages allocated via find_or_create should be
exempt.
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8382d2b9
......@@ -670,7 +670,8 @@ struct page *find_or_create_page(struct address_space *mapping,
page = find_lock_page(mapping, index);
if (!page) {
if (!cached_page) {
cached_page = alloc_page(gfp_mask);
cached_page =
__page_cache_alloc(gfp_mask);
if (!cached_page)
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册