[PATCH 2/4] mm, page_alloc: inline the fast path of the zonelist iterator -fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vlastimil Babka pointed out that the nodes allowed by a cpuset are not
reread if the nodemask changes during an allocation. This potentially
allows an unnecessary page allocation failure. Moving the retry_cpuset
label is insufficient but rereading the nodemask before retrying addresses
the problem.

This is a fix to the mmotm patch
mm-page_alloc-inline-the-fast-path-of-the-zonelist-iterator.patch .

Suggested-by: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
---
 mm/page_alloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d8383750bd43..45a36e98b9cb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3855,6 +3855,7 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
 	 */
 	if (unlikely(!page && read_mems_allowed_retry(cpuset_mems_cookie))) {
 		alloc_mask = gfp_mask;
+		ac.nodemask = &cpuset_current_mems_allowed;
 		goto retry_cpuset;
 	}
 
-- 
2.6.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]