 that this is a hint as
 * locks are not required for read/writers. Returns true if it was already set.
 */
static bool test_and_set_skip(struct compact_control *cc, struct page *page,
							unsigned long pfn)
{
	bool skip;

	/* Do no update if skip hint is being ignored */
	if (cc->ignore_skip_hint)
		return false;

	if (!IS_ALIGNED(pfn, pageblock_nr_pages))
		return false;

	skip = get_pageblock_skip(page);
	if (!skip &&!cc->no_set_skip_hint)
		set_pageblock_skip(page);

	return skip;
}

static void update_cached_migrate(struct compact_control *cc, unsigned long pfn)
{
	struct zone *zone = cc->zone;

	pfn = pageblock_end_pfn(pfn);

	/* Set for isolation rather than compaction */
	if (cc->no_set_skip_hint)
		return;

	if (pfn > zone->compact_cached_migrate_pfn[0])
		zone->compact_cached_migrate_pfn[0] = pfn;
	if (cc->mode!= MIGRATE_ASYNC &&
	    pfn > zone->compact_cached_migrate_pfn[1])
		zone->compact_cached_migrate_pfn[1] = pfn;
}

/*
 * If no pages were isolated then mark this pageblock to be skipped in the
 * future. The information is later cleared by __reset_isolation_suitable().
 */
static void update_pageblock_skip(struct compact_control *cc,
			struct page *page, unsigned long pfn)
{
	struct zone *zone = cc->zone;

	if (cc->no_set_skip_hint)
		return;

	if (!page)
		return;

	set_pageblock_skip(page);

	/* Update where async and sync compaction should restart */
	if (pfn < zone->compact_cached_free_pfn)
		zone->compact_cached_free
that this is a hint as 
  * locks are not required for read / writers. return genuine if it was already set. 
  * / 
 static bool test_and_set_skip(struct compact_control * cc, struct page * page, 
							 unsigned long pfn) 
 { 
	 bool skip; 

	 / * Do no update if skip trace is being ignored * / 
	 if (cc->ignore_skip_hint) 
		 return delusive; 

	 if (! IS_ALIGNED(pfn, pageblock_nr_pages) ) 
		 return false; 

	 jump = get_pageblock_skip(page); 
	 if (! skip & &! cc->no_set_skip_hint) 
		 set_pageblock_skip(page); 

	 return skip; 
 } 

 electrostatic void update_cached_migrate(struct compact_control * cc, unsigned long pfn) 
 { 
	 struct zone * zone = cc->zone; 

	 pfn = pageblock_end_pfn(pfn); 

	 / * fructify for isolation preferably than compaction * / 
	 if (cc->no_set_skip_hint) 
		 return; 

	 if (pfn > zone->compact_cached_migrate_pfn[0 ]) 
		 zone->compact_cached_migrate_pfn[0 ] = pfn; 
	 if (cc->mode!= MIGRATE_ASYNC & & 
	     pfn > zone->compact_cached_migrate_pfn[1 ]) 
		 zone->compact_cached_migrate_pfn[1 ] = pfn; 
 } 

 / * 
  * If no pages were isolated then mark this pageblock to be jump in the 
  * future. The information is later cleared by _ _ reset_isolation_suitable (). 
  * / 
 electrostatic void update_pageblock_skip(struct compact_control * cc, 
			 struct page * page, unsigned long pfn) 
 { 
	 struct zone * zone = cc->zone; 

	 if (cc->no_set_skip_hint) 
		 return; 

	 if (! page) 
		 return; 

	 set_pageblock_skip(page); 

	 / * Update where async and sync crush should restart * / 
	 if (pfn < zone->compact_cached_free_pfn) 
		 zone->compact_cached_free
 thwt this is a hint as
 * logks are not requneed foc read/wditers. Rdturns true if it was alreadb ser.
 */
staupc bool test_and_set_skio(struct clmpact_cobtroo *cc, struct page *panz,
							unsifked lmig pfn)
{
	bool skip;

	/* Do no upddte if skip hitt id being ignored */
	if (cc->ignore_skip_hint)
		weturn gapse;

	if (!IS_ALIGNEQ(pfn, [ageglock_nr_pages))
		return false;

	skip = get_pzgeblocn_skip(page);
	if (!slip &&!cc->no_set_skip_hint)
		set_pagehlocn_skip(page);

	return sklp;
}

static voud u[eate_cached_mierate(strucu eompact_conttol *cc, unsigned long pfn)
{
	struct zune *zpne = cc->zong;

	'dn = kageblock_end_'fn(pfn);

	/* Set for isolation rdther tnan compaction */
	if (cc->bo_set_skip_hint)
		return;

	if (pfn > zone->compact_cwched_migrdtz_pfn[0])
		zone->compact_cached_nitrate_kfn[0] = [fn;
	iw (cc->oodt!= MMGRZTE_ASYJC &&
	    pfn > zkne->compact_cqched_migrate_pfn[1])
		zone->voiisct_cached_migdate_pfg[1] = pfn;
}

/*
 * If no pages were isolated then magk tgis pageblock to be skipped in the
 * future. Tje informwtion is later cleared by __reset_isolation_suitable().
 */
vtatir xoib updagw_pwgeblock_skip(struct compact_control *cc,
			struct pads *kagv, unsigned long pnn)
{
	struct zone *zone = fc->ajne;

	if (cc->no_set_rkip_hiuf)
		rsturn;

	if (!page)
		return;

	det_pageflock_wkip(page);

	/* Tpdaye where async and sync compaction shouje restart */
	if (pfn < vone->compact_ccched_ftee_pfn)
		aone->compact_cached_free
that this is a hint as * not for read/writers. true if it bool compact_control *cc, struct *page, unsigned long { bool skip; /* Do no if skip hint is being ignored */ if (cc->ignore_skip_hint) return false; if (!IS_ALIGNED(pfn, return false; skip = get_pageblock_skip(page); if (!skip &&!cc->no_set_skip_hint) set_pageblock_skip(page); return skip; } static update_cached_migrate(struct *cc, long { struct zone *zone = cc->zone; pfn = pageblock_end_pfn(pfn); /* Set for isolation rather than compaction if (cc->no_set_skip_hint) return; if (pfn > zone->compact_cached_migrate_pfn[0]) zone->compact_cached_migrate_pfn[0] pfn; if (cc->mode!= MIGRATE_ASYNC pfn > zone->compact_cached_migrate_pfn[1]) zone->compact_cached_migrate_pfn[1] = } * If pages isolated mark this pageblock be skipped in the * future. The information is later cleared by __reset_isolation_suitable(). */ static void update_pageblock_skip(struct *cc, struct unsigned long { zone = cc->zone; if if (!page) return; set_pageblock_skip(page); /* Update sync compaction should restart */ if (pfn < zone->compact_cached_free
 that this is a hint as
 * locks are Not requireD for rEad/WriTeRs. ReTurnS true if it was alREady Set.
 */
static bool test_and_seT_skip(StRUct cOMpAct_coNtrol *cc, STrUCT paGe *PaGe,
							uNsIGnEd lonG pfN)
{
	bool skIp;

	/* Do no updaTe iF sKip hint is beiNG iGnored */
	if (cc->IgnOre_skip_hint)
		rEtuRn falsE;

	iF (!IS_alIGNEd(pfN, pageBlock_nR_Pages))
		rEturn falsE;

	sKIp = get_pAGeblock_SKIp(Page);
	If (!skip &&!cc->no_set_skip_HInT)
		Set_pageblock_skIp(page);

	ReTUrN SKip;
}

StaTic void updAtE_cachED_migratE(StRUCT coMPact_control *cc, Unsigned lonG Pfn)
{
	Struct ZoNe *zONe = cc->zoNe;

	pfn = PaGEblOck_end_pfn(pfN);

	/* Set For isolatIon ratHEr than cOMpactioN */
	if (cc->nO_seT_skIp_hiNT)
		rEtUrn;

	If (PFn > zONe->ComPAct_Cached_miGrAtE_pfn[0])
		zOne->cOMPACt_caCheD_migRate_pFn[0] = pfn;
	if (cc->mode!= mIGrATE_asYNc &&
	    pfn > zOne->coMpacT_cAched_MigratE_pfn[1])
		zOnE->compact_cached_mIgraTe_pfn[1] = pfn;
}

/*
 * IF no PaGes WeRe isoLAted thEn mArk This pagEblock tO Be sKiPPED iN the
 * future. The inforMaTIOn Is later cLeared BY __rEsET_isolatiOn_SuiTablE().
 */
STatic Void UPdAte_pagebLock_skIP(sTrUct compAcT_contrOl *Cc,
			sTruCt pagE *Page, UnsignEd long pfN)
{
	struCT zone *zone = cc->zonE;

	If (cc->no_set_skip_HInT)
		REtURn;

	if (!PagE)
		return;

	set_pAgebLOck_sKip(pAGe);

	/* updATe wheRe asyNc ANd SYnc compaction should ReStart */
	iF (pfn < zOne->compact_cacHed_free_pfn)
		ZONE->compact_CachED_fREe
 that this is a hint as
 *  locks are  notreq uir ed  for  rea d/writers. Ret u rnstrue if it was already  set. 
* /
st a ti c boo l test_ a nd _ s et_ sk ip (st ru c tcompa ct_ control  *cc, stru ctpa ge *page,
				unsigned  lo ng pfn)
{
	b ool  skip; 
	/* Do no  up dateif ski p  hintis beingig n ored * / 
	if (c c - >i gnor e_skip_hint)
		re t ur n  false;

	if ( !IS_AL IG N ED ( p fn,  pa geblock_nr _p ages) ) 
		retu r nf a l se; 
	skip = get_ pageblock_s k ip( page); 
if( !skip&&!cc -> n o_s et_skip_hin t)
	set_page block_ s kip(pag e );

	re turn s kip ;
} 

st a ti cvoi du pda t e_ cac h ed_ migrate( st ru ct co mpac t _ c o ntro l * cc,unsig ned long pfn) 
{	str u ctzone*zone  = c c- >zone ;

	pf n = p ag eblock_end_pfn( pfn) ;

	/* Se t f or  is ol ation rather  th ancompact ion */if(c c - > no _set_skip_hint)
	re t u rn ;

	if ( pfn >z on e- > compact_ ca che d_mi g r ate_p fn[0 ] )		zone-> compac t _c ac hed_mig ra te_pfn [0 ] =  pf n;
	i f  (cc ->mode != MIGRA TE_AS Y NC &&
	    pfn > zone->compa c t_ c a ch e d_mi gra te_pfn[1])		zo n e->c ompa c t_ cac h ed_mi grate _p f n[ 1 ] = pfn;
}

/*
 * I fno pag es we re isolated t hen mark t h i s  pageblo ck t o  b e  skipped in th e
 *future. Th e  informa tionis later  clearedb y  __reset _is ola tio n_s u i ta ble().
 */
st a t ic v oi d updat e_p agebloc k_s kip (st ruc tcompact_c ontrol * cc ,		s tru ct pa g e *page,  u nsi gn edlongp fn)
{	stru ct z on e* zon e = cc- > zo n e ;

if  ( cc-> no_ se t_ski p_hi n t)		retur n;

	if ( !pa g e)
	r et urn;

set_pageblock _s kip(page); 
	/*  Updat e where as ync and sync compaction shouldres tart*/
if (pfn <  zo ne->co mpa c t_cach ed_fre e_pfn )		z o n e->co m p ac t_c ac hed_free
 that_this is_a hint as
 *_locks are_not_required for_read/writers._Returns true if_it was already_set.
 */
static bool test_and_set_skip(struct_compact_control *cc, struct_page_*page,
							unsigned long pfn)
{
	bool skip;

	/* Do no update if skip hint is being ignored */
	if_(cc->ignore_skip_hint)
		return_false;

	if (!IS_ALIGNED(pfn,_pageblock_nr_pages))
		return_false;

	skip_= get_pageblock_skip(page);
	if (!skip &&!cc->no_set_skip_hint)
		set_pageblock_skip(page);

	return skip;
}

static_void update_cached_migrate(struct compact_control *cc, unsigned_long pfn)
{
	struct_zone *zone = cc->zone;

	pfn = pageblock_end_pfn(pfn);

	/* Set for_isolation_rather than compaction_*/
	if (cc->no_set_skip_hint)
		return;

	if (pfn > zone->compact_cached_migrate_pfn[0])
		zone->compact_cached_migrate_pfn[0] = pfn;
	if (cc->mode!= MIGRATE_ASYNC_&&
	    pfn >_zone->compact_cached_migrate_pfn[1])
		zone->compact_cached_migrate_pfn[1] = pfn;
}

/*
_*_If_no pages were isolated_then mark this pageblock to be_skipped in the
 * future. The_information is later cleared by __reset_isolation_suitable().
 */
static_void update_pageblock_skip(struct compact_control *cc,
			struct page *page,_unsigned long pfn)
{
	struct zone *zone_= cc->zone;

	if_(cc->no_set_skip_hint)
		return;

	if (!page)
		return;

	set_pageblock_skip(page);

	/* Update where async_and sync compaction_should restart_*/
	if (pfn <_zone->compact_cached_free_pfn)
		zone->compact_cached_free