Commit [273293]  Maximize  Restore  History

mm: page_alloc: exempt GFP_THISNODE allocations from zone fairness

Jan Stancek reports manual page migration encountering allocation
failures after some pages when there is still plenty of memory free, and
bisected the problem down to commit 81c0a2bb515f ("mm: page_alloc: fair
zone allocator policy").

The problem is that GFP_THISNODE obeys the zone fairness allocation
batches on one hand, but doesn't reset them and wake kswapd on the other
hand. After a few of those allocations, the batches are exhausted and
the allocations fail.

Fixing this means either having GFP_THISNODE wake up kswapd, or
GFP_THISNODE not participating in zone fairness at all. The latter
seems safer as an acute bugfix, we can clean up later.

Reported-by: Jan Stancek <>
Signed-off-by: Johannes Weiner <>
Acked-by: Rik van Riel <>
Acked-by: Mel Gorman <>
Cc: <> [3.12+]
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>

Johannes Weiner Johannes Weiner 2014-03-03

Linus Torvalds Linus Torvalds 2014-03-04

changed mm/page_alloc.c
mm/page_alloc.c Diff Switch to side-by-side view

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks