public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dhaval Giani <dhaval@linux.vnet.ibm.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	htejun@gmail.com, Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	Balbir Singh <balbir@in.ibm.com>,
	maneesh@linux.vnet.ibm.com, lkml <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: 2.6.22-stable causes oomkiller to be invoked
Date: Tue, 8 Jan 2008 10:03:48 +0530	[thread overview]
Message-ID: <20080108043348.GB5393@linux.vnet.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0801071203070.24592@schroedinger.engr.sgi.com>

On Mon, Jan 07, 2008 at 12:04:06PM -0800, Christoph Lameter wrote:
> Here is the cleaned version of the patch. Dhaval is testing it.
> 
> 
> quicklists: Only consider memory that can be used with GFP_KERNEL
> 
> Quicklists calculates the size of the quicklists based on the number
> of free pages. This must be the number of free pages that can be
> allocated with GFP_KERNEL. node_page_state() includes the pages in
> ZONE_HIGHMEM and ZONE_MOVABLE which may lead the quicklists to
> become too large causing OOM.
> 
> Signed-off-by: Christoph Lameter <clameter@sgi.com>

Does the job here for me.

Tested-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>

> 
> Index: linux-2.6/mm/quicklist.c
> ===================================================================
> --- linux-2.6.orig/mm/quicklist.c	2008-01-07 10:38:13.000000000 -0800
> +++ linux-2.6/mm/quicklist.c	2008-01-07 10:38:44.000000000 -0800
> @@ -26,9 +26,17 @@ DEFINE_PER_CPU(struct quicklist, quickli
>  static unsigned long max_pages(unsigned long min_pages)
>  {
>  	unsigned long node_free_pages, max;
> +	struct zone *zones = NODE_DATA(numa_node_id())->node_zones;
> +
> +	node_free_pages =
> +#ifdef CONFIG_ZONE_DMA
> +		zone_page_state(&zones[ZONE_DMA], NR_FREE_PAGES) +
> +#endif
> +#ifdef CONFIG_ZONE_DMA32
> +		zone_page_state(&zones[ZONE_DMA32], NR_FREE_PAGES) +
> +#endif
> +		zone_page_state(&zones[ZONE_NORMAL], NR_FREE_PAGES);
> 
> -	node_free_pages = node_page_state(numa_node_id(),
> -			NR_FREE_PAGES);
>  	max = node_free_pages / FRACTION_OF_NODE_MEM;
>  	return max(max, min_pages);
>  }

-- 
regards,
Dhaval

  reply	other threads:[~2008-01-08  4:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 12:33 2.6.22-stable causes oomkiller to be invoked Dhaval Giani
2007-12-13 13:23 ` Dhaval Giani
2007-12-13 15:18   ` Dhaval Giani
2007-12-13 16:29     ` Greg KH
2007-12-13 16:46       ` Dhaval Giani
2007-12-13 17:54         ` Dhaval Giani
2007-12-14 14:41           ` Tejun Heo
2007-12-14 15:47             ` Dhaval Giani
2007-12-14 15:54               ` Tejun Heo
2007-12-14 16:16                 ` Dhaval Giani
2007-12-14 17:50                   ` Andrew Morton
2007-12-14 18:28                     ` Dhaval Giani
2007-12-14 23:05                       ` Andrew Morton
2007-12-15  3:52                         ` Dhaval Giani
2007-12-15  6:00                           ` Andrew Morton
2007-12-15 10:44                             ` Dhaval Giani
     [not found]                               ` <20071217045904.GB31386@linux.vnet.ibm.com>
     [not found]                                 ` <Pine.LNX.4.64.0712171143280.12871@schroedinger.engr.sgi.com>
     [not found]                                   ` <20071217120720.e078194b.akpm@linux-foundation.org>
     [not found]                                     ` <Pine.LNX.4.64.0712171222470.29500@schroedinger.engr.sgi.com>
2007-12-21  4:45                                       ` Dhaval Giani
2007-12-26 21:01                                         ` Christoph Lameter
2007-12-28 10:11                                           ` Dhaval Giani
2008-01-02 20:45                                             ` Christoph Lameter
2008-01-02 21:54                                               ` Christoph Lameter
2008-01-03  3:59                                                 ` Dhaval Giani
2008-01-03  4:16                                                   ` Dhaval Giani
2008-01-03 21:04                                                     ` Christoph Lameter
2008-01-07 20:04                                                       ` Christoph Lameter
2008-01-08  4:33                                                         ` Dhaval Giani [this message]
2007-12-30 14:01                                           ` Ingo Molnar
2007-12-30 19:24                                             ` Dhaval Giani
2008-01-02 20:48                                             ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080108043348.GB5393@linux.vnet.ibm.com \
    --to=dhaval@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@in.ibm.com \
    --cc=clameter@sgi.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maneesh@linux.vnet.ibm.com \
    --cc=vatsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox