Skip to content

Commit

Permalink
Fix: find_or_create_page skips cpuset memory spreading.
Browse files Browse the repository at this point in the history
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: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed May 17, 2007
1 parent 8382d2b commit 43c0f3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 43c0f3d

Please sign in to comment.