lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Nov 2009 12:05:09 -0500 (EST)
From:	Christoph Lameter <cl@...ux-foundation.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"kosaki.motohiro@...fujitsu.com" <kosaki.motohiro@...fujitsu.com>,
	aarcange@...hat.com, akpm@...ux-foundation.org,
	minchan.kim@...il.com, rientjes@...gle.com, vedran.furac@...il.com,
	"hugh.dickins@...cali.co.uk" <hugh.dickins@...cali.co.uk>
Subject: Re: [RFC][-mm][PATCH 1/6] oom-killer: updates for classification of
 OOM

On Mon, 2 Nov 2009, KAMEZAWA Hiroyuki wrote:

>  /*
> - * Types of limitations to the nodes from which allocations may occur
> + * Types of limitations to zones from which allocations may occur
>   */

"Types of limitations that may cause OOMs"? MEMCG limitations are not zone
based.

>   */
>
> -unsigned long badness(struct task_struct *p, unsigned long uptime)
> +static unsigned long __badness(struct task_struct *p,
> +		      unsigned long uptime, enum oom_constraint constraint,
> +		      struct mem_cgroup *mem)
>  {
>  	unsigned long points, cpu_time, run_time;
>  	struct mm_struct *mm;

Why rename this function? You are adding a global_badness anyways.


> +	/*
> +	 * In numa environ, almost all allocation will be against NORMAL zone.

The typical allocations will be against the policy_zone! SGI IA64 (and
others) have policy_zone == GFP_DMA.

> +	 * But some small area, ex)GFP_DMA for ia64 or GFP_DMA32 for x86-64
> +	 * can cause OOM. We can use policy_zone for checking lowmem.
> +	 */

Simply say that we are checking if the zone constraint is below the policy
zone?

> +	 * Now, only mempolicy specifies nodemask. But if nodemask
> +	 * covers all nodes, this oom is global oom.
> +	 */
> +	if (nodemask && !nodes_equal(node_states[N_HIGH_MEMORY], *nodemask))
> +		ret = CONSTRAINT_MEMORY_POLICY;

Huh? A cpuset can also restrict the nodes?

> +	/*
> + 	 * If not __GFP_THISNODE, zonelist containes all nodes. And if

Dont see any __GFP_THISNODE checks here.

>  		panic("out of memory from page fault. panic_on_oom is selected.\n");
>
>  	read_lock(&tasklist_lock);
> -	__out_of_memory(0, 0); /* unknown gfp_mask and order */
> +	/*
> +	 * Considering nature of pages required for page-fault,this must be
> +	 * global OOM (if not cpuset...). Then, CONSTRAINT_NONE is correct.
> +	 * zonelist, nodemasks are unknown...
> +	 */
> +	__out_of_memory(0, CONSTRAINT_NONE, 0, NULL);
>  	read_unlock(&tasklist_lock);

Page faults can occur on processes that have memory restrictions.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ