} if (gfp_mask & __GFP_NOFAIL) { blk_congestion_wait(WRITE, HZ/50); goto nofail_alloc; 
__alloc_pages(gfp_t gfp_mask, unsigned int order,		struct zonelist *zonelist){	const gfp_t wait = gfp_mask & __GFP_WAIT;	struct zone **zones, *z;	struct page *page;	struct reclaim_state reclaim_state;	struct task_struct *p = current;	int i;	int classzone_idx;	int do_retry;	int can_try_harder;	int did_some_progress;	might_sleep_if(wait);	/*	 * The caller may dip into page reserves a bit more if the caller	 * cannot run direct reclaim, or is the caller has realtime scheduling	 * policy	 */	can_try_harder = (unlikely(rt_task(p)) && !in_interrupt()) || !wait;	zones = zonelist->zones;  /* the list of zones suitable for gfp_mask */	if (unlikely(zones[0] == NULL)) {		/* Should this ever happen?? */		return NULL;	}	classzone_idx = zone_idx(zones[0]);restart:	/*	 * Go through the zonelist once, looking for a zone with enough free.	 * See also cpuset_zone_allowed() comment in kernel/cpuset.c.	 */	for (i = 0; (z = zones[i]) != NULL; i++) {		int do_reclaim = should_reclaim_zone(z, gfp_mask);		if (!cpuset_zone_allowed(z, __GFP_HARDWALL))			continue;		/*		 * If the zone is to attempt early page reclaim then this loop		 * will try to reclaim pages and check the watermark a second		 * time before giving up and falling back to the next zone.		 */zone_reclaim_retry:		if (!zone_watermark_ok(z, order, z->pages_low,				       classzone_idx, 0, 0)) {			if (!do_reclaim)				continue;			else {				zone_reclaim(z, gfp_mask, order);				/* Only try reclaim once */				do_reclaim = 0;				goto zone_reclaim_retry;			}		}		page = buffered_rmqueue(z, order, gfp_mask);		if (page)			goto got_pg;	}	for (i = 0; (z = zones[i]) != NULL; i++)		wakeup_kswapd(z, order);	/*	 * Go through the zonelist again. Let __GFP_HIGH and allocations	 * coming from realtime tasks to go deeper into reserves	 *	 * This is the last chance, in general, before the goto nopage.	 * Ignore cpuset if GFP_ATOMIC (!wait) rather than fail alloc.	 * See also cpuset_zone_allowed() comment in kernel/cpuset.c.	 */	for (i = 0; (z = zones[i]) != NULL; i++) {		if (!zone_watermark_ok(z, order, z->pages_min,				       classzone_idx, can_try_harder,				       gfp_mask & __GFP_HIGH))			continue;		if (wait && !cpuset_zone_allowed(z, gfp_mask))			continue;		page = buffered_rmqueue(z, order, gfp_mask);		if (page)			goto got_pg;	}	/* This allocation should allow future memory freeing. */	if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE)))			&& !in_interrupt()) {		if (!(gfp_mask & __GFP_NOMEMALLOC)) {			/* go through the zonelist yet again, ignoring mins */			for (i = 0; (z = zones[i]) != NULL; i++) {				if (!cpuset_zone_allowed(z, gfp_mask))					continue;				page = buffered_rmqueue(z, order, gfp_mask);				if (page)					goto got_pg;			}		}		goto nopage;	}	/* Atomic allocations - we can't balance anything */	if (!wait)		goto nopage;rebalance:	cond_resched();	/* We now go into synchronous reclaim */	p->flags |= PF_MEMALLOC;	reclaim_state.reclaimed_slab = 0;	p->reclaim_state = &reclaim_state;	did_some_progress = try_to_free_pages(zones, gfp_mask);	p->reclaim_state = NULL;	p->flags &= ~PF_MEMALLOC;	cond_resched();	if (likely(did_some_progress)) {		for (i = 0; (z = zones[i]) != NULL; i++) {			if (!zone_watermark_ok(z, order, z->pages_min,					       classzone_idx, can_try_harder,					       gfp_mask & __GFP_HIGH))				continue;			if (!cpuset_zone_allowed(z, gfp_mask))				continue;			page = buffered_rmqueue(z, order, gfp_mask);			if (page)				goto got_pg;		}	} else if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) {		/*		 * Go through the zonelist yet one more time, keep		 * very high watermark here, this is only to catch		 * a parallel oom killing, we must fail if we're still		 * under heavy pressure.		 */		for (i = 0; (z = zones[i]) != NULL; i++) {			if (!zone_watermark_ok(z, order, z->pages_high,					       classzone_idx, 0, 0))				continue;			if (!cpuset_zone_allowed(z, __GFP_HARDWALL))				continue;			page = buffered_rmqueue(z, order, gfp_mask);			if (page)				goto got_pg;		}		out_of_memory(gfp_mask, order);		goto restart;	}	/*	 * Don't let big-order allocations loop unless the caller explicitly	 * requests that.  Wait for some write requests to complete then retry.	 *	 * In this implementation, __GFP_REPEAT means __GFP_NOFAIL for order	 * <= 3, but that may not be true in other implementations.	 */	do_retry = 0;	if (!(gfp_mask & __GFP_NORETRY)) {		if ((order <= 3) || (gfp_mask & __GFP_REPEAT))			do_retry = 1;		if (gfp_mask & __GFP_NOFAIL)			do_retry = 1;	}	if (do_retry) {		blk_congestion_wait(WRITE, HZ/50);		goto rebalance;	}nopage:	if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {		printk(KERN_WARNING "%s: page allocation failure."			" order:%d, mode:0x%x\n",			p->comm, order, gfp_mask);		dump_stack();		show_mem();	}	return NULL;got_pg:	zone_statistics(zonelist, z);	return page;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/885036d32f5d3c427c3e2b385b5a5503805e3e52/page_alloc.c/clean/mm/page_alloc.c