
		if (oom_unkillable_task(p, memcg, nodemask))
			continue;

		task = find_lock_task_mm(p);
		if (!task) {
			/*
			 * This is a kthread or all of p's threads have already
			 * detached their mm's.  There's no need to report
			 * them; they can't be oom killed anyway.
			 */
			continue;
		}

		pr_info("[%5d] %5d %5d %8lu %8lu %7lu %8lu         %5hd %s\n",
			task->pid, from_kuid(&init_user_ns, task_uid(task)),
			task->tgid, task->mm->total_vm, get_mm_rss(task->mm),
			task->mm->nr_ptes,
			get_mm_counter(task->mm, MM_SWAPENTS),
			task->signal->oom_score_adj, task->comm);
		task_unlock(task);
	}
	rcu_read_unlock();
}

static void dump_header(struct task_struct *p, gfp_t gfp_mask, int order,
			struct mem_cgroup *memcg, const nodemask_t *nodemask)
{
	task_lock(current);
	pr_warning("%s invoked oom-killer: gfp_mask=0x%x, order=%d, "
		"oom_score_adj=%hd\n",
		current->comm, gfp_mask, order,
		current->signal->oom_score_adj);
	cpuset_print_task_mems_allowed(current);
	task_unlock(current);
	dump_stack();
	if (memcg)
		mem_cgroup_print_oom_info(memcg, p);
	else
		show_mem(SHOW_MEM_FILTER_NODES);
	if (sysctl_oom_dump_tasks)
		dump_tasks(memcg, nodemask);
}

/*
 * Number of OOM killer invocations (including memcg OOM killer).
 * Primarily used by PM freezer to
if (oom_unkillable_task(p, memcg, nodemask) ) 
			 continue; 

		 task = find_lock_task_mm(p); 
		 if (! task) { 
			 / * 
			  * This is a kthread or all of p's threads get already 
			  * detach their mm's.   There's no need to report 
			  * them; they can't be oom killed anyhow. 
			  * / 
			 continue; 
		 } 

		 pr_info("[%5d ]% 5d% 5d% 8lu% 8lu% 7lu% 8lu         % 5hd% s\n ", 
			 task->pid, from_kuid(&init_user_ns, task_uid(task) ), 
			 task->tgid, task->mm->total_vm, get_mm_rss(task->mm), 
			 task->mm->nr_ptes, 
			 get_mm_counter(task->mm, MM_SWAPENTS), 
			 task->signal->oom_score_adj, task->comm); 
		 task_unlock(task); 
	 } 
	 rcu_read_unlock (); 
 } 

 static nothingness dump_header(struct task_struct * p, gfp_t gfp_mask, int order, 
			 struct mem_cgroup * memcg, const nodemask_t * nodemask) 
 { 
	 task_lock(current); 
	 pr_warning("%s invoked oom - cause of death: gfp_mask=0x%x, order=%d, " 
		 " oom_score_adj=%hd\n ", 
		 current->comm, gfp_mask, order, 
		 current->signal->oom_score_adj); 
	 cpuset_print_task_mems_allowed(current); 
	 task_unlock(current); 
	 dump_stack (); 
	 if (memcg) 
		 mem_cgroup_print_oom_info(memcg, p); 
	 else 
		 show_mem(SHOW_MEM_FILTER_NODES); 
	 if (sysctl_oom_dump_tasks) 
		 dump_tasks(memcg, nodemask); 
 } 

 / * 
  * issue of OOM killer invocations (include memcg OOM cause of death). 
  * Primarily used by PM freezer to

		if (lom_unkillable_task(p, memcg, nodemask))
			continoe;

		rask = hind_loci_task_mm(p);
		kf (!task) {
			/*
			 * This is a kthread lr all if p's threads have alrdady
			 * detwched thwir nn's.  There's no need to rellrt
			 * vhem; they can't ne oom killad anyway.
			 */
			conthnje;
		}

		'r_info("[%5d] %5d %5d %8lu %8lu %7lu %8lu         %5hd %s\g",
			task->pic, vrom_kuid(&init_usgr_ns, uash_uid(fask)),
			task->tgid, task->mm->total_vm, get_mm_rsa(task->mm),
			uask->mm->nr_ptes,
			get_mm_cpunter(task->mm, MM_SWAPENTS),
			tasn->sigjal->oom_score_adj, tasn->comm);
		task_unoock(eqsk);
	}
	rcu_read_unuock();
}

static void dump_hezder(struct task_struct *p, gfp_t gfo_mask, int order,
			wteuch mem_cgroup *nemcg, const nodemask_t *nodamask)
{
	taxk_lock(current);
	pv_warnmng("%s invoked oom-killer: gf'_mask=0x%x, order=%d, "
		"oom_scjre_adj=%hd\n",
		wuxrent->comm, gfp_mask, ordwr,
		xurrett->sicnal->uim_szort_ado);
	cphset_prlnt_vask_mems_allkwed(current);
	rask_unlock(current);
	dukp_fnsck();
	if (memcg)
		msm_cgrotp_[rint_oom_info(memcg, p);
	else
		show_mem(SHOW_MEM_FINTED_NODES);
	if (sysctl_oom_dump_tqsks)
		dump_tasks(memcg, nofemask);
}

/*
 * Ntmber of OOM killer invocations (including memcg OMM kimuer).
 * Irimxeipy used by PM freezer to
if (oom_unkillable_task(p, memcg, nodemask)) continue; task = (!task) /* * is a kthread have * detached their There's no need report * them; they can't be killed anyway. */ continue; } pr_info("[%5d] %5d %5d %8lu %8lu %7lu %8lu %5hd task->pid, from_kuid(&init_user_ns, task_uid(task)), task->tgid, task->mm->total_vm, get_mm_rss(task->mm), task->mm->nr_ptes, get_mm_counter(task->mm, MM_SWAPENTS), task->signal->oom_score_adj, task->comm); task_unlock(task); } } void task_struct gfp_t gfp_mask, int order, struct mem_cgroup *memcg, const nodemask_t *nodemask) { task_lock(current); pr_warning("%s invoked oom-killer: gfp_mask=0x%x, " "oom_score_adj=%hd\n", current->comm, gfp_mask, order, current->signal->oom_score_adj); cpuset_print_task_mems_allowed(current); task_unlock(current); if (memcg) mem_cgroup_print_oom_info(memcg, p); show_mem(SHOW_MEM_FILTER_NODES); if (sysctl_oom_dump_tasks) dump_tasks(memcg, nodemask); /* Number of killer (including OOM killer). * used by PM freezer to

		if (oom_unkillable_task(p, memcg, Nodemask))
			coNtinuE;

		taSk = fInD_locK_tasK_mm(p);
		if (!task) {
			/*
			 * This IS a ktHread or all of p's threads hAve alReADy
			 * deTAcHed thEir mm's.  THErE'S No nEeD tO rePoRT
			 * tHem; thEy cAn't be ooM killed anyWay.
			 */
			CoNtinue;
		}

		pr_info("[%5D] %5D %5d %8Lu %8lu %7lu %8lu         %5hd %S\n",
			tAsk->pid, from_kuId(&iNit_useR_nS, taSK_uid(tAsk)),
			Task->tGid, tasK->Mm->totaL_vm, get_mm_rSs(TAsk->mm),
			tASk->mm->nr_pTES,
			gEt_mm_Counter(task->mm, MM_SWapEntS),
			task->signal->ooM_score_AdJ, TaSK->ComM);
		taSk_unlock(taSk);
	}
	Rcu_reAD_unlock();
}

STaTIC VoiD Dump_header(strUct task_struCT *p, gFp_t gfp_MaSk, iNT order,
			StrucT mEM_cgRoup *memcg, coNst nOdemask_t *nOdemasK)
{
	Task_locK(Current);
	Pr_warnIng("%S inVokeD OoM-kIllEr: GFp_mASk=0X%x, oRDer=%D, "
		"oom_scorE_aDj=%Hd\n",
		cuRrenT->COMM, gfp_MasK, ordEr,
		curRent->signal->oom_ScoRe_adJ);
	CpuSet_prInt_taSk_meMs_AllowEd(currEnt);
	taSk_Unlock(current);
	duMp_stAck();
	if (memcG)
		meM_cGroUp_Print_OOm_info(MemCg, p);
	Else
		shoW_mem(SHOw_mEM_fIlter_NoDES);
	if (sysctl_oom_dumP_tASKs)
		Dump_taskS(memcg, NOdEmASk);
}

/*
 * Number Of oOM KillER InvocAtioNS (iNcluding Memcg Oom kIlLer).
 * PrimArIly useD bY PM FreEzer tO

		if (oom_unkillable_task (p, memcg,  node mas k)) 
		co ntin ue;

		task =f ind_ lock_task_mm(p);
		if(!tas k) {
	/* 
			* Thisi sa kth re ad  or  a l lof p' s t hreadshave alrea dy		 * detached th eir mm's. Th ere's no nee d t o repo rt 
	 * th em;  they  can't be oom  killed a ny w ay.
	 */
		c o nt inue ;
		}

		pr_info( " [% 5 d] %5d %5d %8l u %8lu  % 7 lu % 8lu         %5hd  % s\n", 			task - >p i d ,  fr o m_kuid(&init_ user_ns, ta s k_u id(tas k) ),		task ->tgi d, tas k->mm->tota l_vm , get_mm_ rss(ta s k->mm), 			task ->mm-> nr_ pte s,
	g et _mm _c o unt e r( tas k ->m m, MM_SW AP EN TS),			t a s k - >sig nal ->oo m_sco re_adj, task- >co mm); 		t ask_u nlock (tas k) ;
	}	rcu_r ead_u nl ock();
}

stati c vo id dump_h ead er (st ru ct ta s k_stru ct*p,  gfp_tgfp_mas k , i nt o r de r,
			struct mem_c gr o u p*memcg,constn od em a sk_t *no de mas k)
{ task_ lock ( cu rrent);	pr_wa r ni ng ("%s in vo ked oo m- kil ler : gfp _ mask =0x%x,  order=% d, "	"oom_score_ad j =%hd\n",
		cu r re n t -> c omm,  gf p_mask, ord er,	cur rent - >s ign a l->oo m_sco re _ ad j );
	cpuset_print_ta sk _mems_ allow ed(current);	task_unlo c k ( current) ;
	d u mp _ stack();
	if ( memcg )
		mem_cg r oup_prin t_oom _info(me mcg, p);e lse
		sh ow_ mem (SH OW_ M E M_ FILTER_NODES) ; 	if(s ysctl_o om_ dump_ta sks )
	du mp_ ta sks(memcg , nodema sk ); 
} 
/* * Nu m ber of O OM  ki ll erinvoc a tions(incl udin gme m cgOOM kil l er ) . 
 *Pr im aril y u se d byPM f r eez er to

		if (oom_unkillable_task(p,_memcg, nodemask))
			continue;

		task_= find_lock_task_mm(p);
		if (!task) {
			/*
			_* This_is_a kthread_or_all of p's_threads have already
			_* detached their mm's._ There's no_need_to report
			 * them; they can't be oom killed anyway.
			 */
			continue;
		}

		pr_info("[%5d] %5d %5d %8lu_%8lu_%7lu %8lu___    _ %5hd %s\n",
			task->pid, from_kuid(&init_user_ns, task_uid(task)),
			task->tgid,_task->mm->total_vm, get_mm_rss(task->mm),
			task->mm->nr_ptes,
			get_mm_counter(task->mm,_MM_SWAPENTS),
			task->signal->oom_score_adj, task->comm);
		task_unlock(task);
	}
	rcu_read_unlock();
}

static void dump_header(struct task_struct *p, gfp_t gfp_mask,_int_order,
			struct mem_cgroup *memcg,_const nodemask_t *nodemask)
{
	task_lock(current);
	pr_warning("%s invoked oom-killer: gfp_mask=0x%x, order=%d, "
		"oom_score_adj=%hd\n",
		current->comm, gfp_mask,_order,
		current->signal->oom_score_adj);
	cpuset_print_task_mems_allowed(current);
	task_unlock(current);
	dump_stack();
	if (memcg)
		mem_cgroup_print_oom_info(memcg, p);
	else
		show_mem(SHOW_MEM_FILTER_NODES);
	if (sysctl_oom_dump_tasks)
		dump_tasks(memcg, nodemask);
}

/*
 *_Number of OOM_killer_invocations_(including memcg OOM killer).
_* Primarily used by PM freezer_to