Commit 9d0ed60fe9cd1fbf57f755cd27a23ae9114d7210

Authored by Mel Gorman
Committed by Linus Torvalds
1 parent cc4a685146

page allocator: Do not allow interrupts to use ALLOC_HARDER

Commit 341ce06f69abfafa31b9468410a13dbd60e2b237 ("page allocator:
calculate the alloc_flags for allocation only once") altered watermark
logic slightly by allowing rt_tasks that are handling an interrupt to set
ALLOC_HARDER.  This patch brings the watermark logic more in line with
2.6.30.

This change results in a reduction of the number high-order GFP_ATOMIC
allocation failures reported.  See
http://www.gossamer-threads.com/lists/linux/kernel/1144153

[rientjes@google.com: Spotted the problem]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1769,7 +1769,7 @@
1769 1769 * See also cpuset_zone_allowed() comment in kernel/cpuset.c.
1770 1770 */
1771 1771 alloc_flags &= ~ALLOC_CPUSET;
1772   - } else if (unlikely(rt_task(p)))
  1772 + } else if (unlikely(rt_task(p)) && !in_interrupt())
1773 1773 alloc_flags |= ALLOC_HARDER;
1774 1774  
1775 1775 if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) {