public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix OOM killing processes wrongly thought MPOL_BIND
@ 2007-04-18 19:35 Hugh Dickins
  2007-04-18 21:11 ` Christoph Lameter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hugh Dickins @ 2007-04-18 19:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: KAMEZAWA Hiroyuki, Christoph Lameter, linux-kernel

I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog
to see lots of other processes killed with "No available memory (MPOL_BIND)".
memhog is killed correctly once we initialize nodemask in constrained_alloc().

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
Perhaps appropriate for 2.6.20-stable too - regression since 2.6.19.

 mm/oom_kill.c |    2 ++
 1 file changed, 2 insertions(+)

--- 2.6.21-rc7/mm/oom_kill.c	2007-03-26 07:30:54.000000000 +0100
+++ linux/mm/oom_kill.c	2007-04-18 20:18:21.000000000 +0100
@@ -176,6 +176,8 @@ static inline int constrained_alloc(stru
 	struct zone **z;
 	nodemask_t nodes;
 	int node;
+
+	nodes_clear(nodes);
 	/* node has memory ? */
 	for_each_online_node(node)
 		if (NODE_DATA(node)->node_present_pages)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix OOM killing processes wrongly thought MPOL_BIND
  2007-04-18 19:35 [PATCH] fix OOM killing processes wrongly thought MPOL_BIND Hugh Dickins
@ 2007-04-18 21:11 ` Christoph Lameter
  2007-04-18 21:23 ` William Lee Irwin III
  2007-04-19  0:29 ` KAMEZAWA Hiroyuki
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Lameter @ 2007-04-18 21:11 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Andrew Morton, KAMEZAWA Hiroyuki, Christoph Lameter, linux-kernel

On Wed, 18 Apr 2007, Hugh Dickins wrote:

> I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog
> to see lots of other processes killed with "No available memory (MPOL_BIND)".
> memhog is killed correctly once we initialize nodemask in constrained_alloc().
> 
> Signed-off-by: Hugh Dickins <hugh@veritas.com>

Acked-by: Christoph Lameter <clameter@sgi.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix OOM killing processes wrongly thought MPOL_BIND
  2007-04-18 19:35 [PATCH] fix OOM killing processes wrongly thought MPOL_BIND Hugh Dickins
  2007-04-18 21:11 ` Christoph Lameter
@ 2007-04-18 21:23 ` William Lee Irwin III
  2007-04-19  0:29 ` KAMEZAWA Hiroyuki
  2 siblings, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2007-04-18 21:23 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Andrew Morton, KAMEZAWA Hiroyuki, Christoph Lameter, linux-kernel

On Wed, Apr 18, 2007 at 08:35:22PM +0100, Hugh Dickins wrote:
> I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog
> to see lots of other processes killed with "No available memory (MPOL_BIND)".
> memhog is killed correctly once we initialize nodemask in constrained_alloc().
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
> ---
> Perhaps appropriate for 2.6.20-stable too - regression since 2.6.19.

This is a clear fix for an uninitialized variable.


Acked-by: William Irwin <bill.irwin@oracle.com>


-- wli

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix OOM killing processes wrongly thought MPOL_BIND
  2007-04-18 19:35 [PATCH] fix OOM killing processes wrongly thought MPOL_BIND Hugh Dickins
  2007-04-18 21:11 ` Christoph Lameter
  2007-04-18 21:23 ` William Lee Irwin III
@ 2007-04-19  0:29 ` KAMEZAWA Hiroyuki
  2 siblings, 0 replies; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-04-19  0:29 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: akpm, clameter, linux-kernel

On Wed, 18 Apr 2007 20:35:22 +0100 (BST)
Hugh Dickins <hugh@veritas.com> wrote:

> I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog
> to see lots of other processes killed with "No available memory (MPOL_BIND)".
> memhog is killed correctly once we initialize nodemask in constrained_alloc().
> 

thank you for catching bug.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


> Signed-off-by: Hugh Dickins <hugh@veritas.com>
> ---
> Perhaps appropriate for 2.6.20-stable too - regression since 2.6.19.
> 
>  mm/oom_kill.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- 2.6.21-rc7/mm/oom_kill.c	2007-03-26 07:30:54.000000000 +0100
> +++ linux/mm/oom_kill.c	2007-04-18 20:18:21.000000000 +0100
> @@ -176,6 +176,8 @@ static inline int constrained_alloc(stru
>  	struct zone **z;
>  	nodemask_t nodes;
>  	int node;
> +
> +	nodes_clear(nodes);
>  	/* node has memory ? */
>  	for_each_online_node(node)
>  		if (NODE_DATA(node)->node_present_pages)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-19  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-18 19:35 [PATCH] fix OOM killing processes wrongly thought MPOL_BIND Hugh Dickins
2007-04-18 21:11 ` Christoph Lameter
2007-04-18 21:23 ` William Lee Irwin III
2007-04-19  0:29 ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox