Re: [PATCH 04/31] mm: tag reseve pages

From: David Rientjes
Date: Thu Oct 01 2009 - 17:10:06 EST


On Thu, 1 Oct 2009, Suresh Jayaraman wrote:

> Index: mmotm/mm/page_alloc.c
> ===================================================================
> --- mmotm.orig/mm/page_alloc.c
> +++ mmotm/mm/page_alloc.c
> @@ -1501,8 +1501,10 @@ zonelist_scan:
> try_this_zone:
> page = buffered_rmqueue(preferred_zone, zone, order,
> gfp_mask, migratetype);
> - if (page)
> + if (page) {
> + page->reserve = !!(alloc_flags & ALLOC_NO_WATERMARKS);
> break;
> + }
> this_zone_full:
> if (NUMA_BUILD)
> zlc_mark_zone_full(zonelist, z);

page->reserve won't necessary indicate that access to reserves was
_necessary_ for the allocation to succeed, though. This will mark any
page being allocated under PF_MEMALLOC as reserve when all zones may be
well above their min watermarks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/