public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Andy Chittenden <AChittenden@bluearc.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, lwoodman@redhat.com
Subject: Re: Out of Memory: Killed process 16498 (java).
Date: Thu, 19 Jan 2006 14:48:36 -0500	[thread overview]
Message-ID: <20060119194836.GM21663@redhat.com> (raw)
In-Reply-To: <89E85E0168AD994693B574C80EDB9C270355601F@uk-email.terastack.bluearc.com>

On Thu, Jan 19, 2006 at 03:11:45PM -0000, Andy Chittenden wrote:
 > DMA free:20kB min:24kB low:28kB high:36kB active:0kB inactive:0kB
 > present:12740kB pages_scanned:4 all_unreclaimable? yes

Note we only scanned 4 pages before we gave up.
Larry Woodman came up with this patch below that clears all_unreclaimable
when in two places where we've made progress at freeing up some pages
which has helped oom situations for some of our users.

From: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6/mm/filemap.c~	2005-12-10 01:47:15.000000000 -0500
+++ linux-2.6/mm/filemap.c	2005-12-10 01:47:46.000000000 -0500
@@ -471,11 +471,18 @@ EXPORT_SYMBOL(unlock_page);
  */
 void end_page_writeback(struct page *page)
 {
+	struct zone *zone = page_zone(page);
 	if (!TestClearPageReclaim(page) || rotate_reclaimable_page(page)) {
 		if (!test_clear_page_writeback(page))
 			BUG();
 	}
 	smp_mb__after_clear_bit();
+	if (zone->all_unreclaimable) {
+		spin_lock(&zone->lock);
+		zone->all_unreclaimable = 0;
+		zone->pages_scanned = 0;
+		spin_unlock(&zone->lock);
+	}
 	wake_up_page(page, PG_writeback);
 }
 EXPORT_SYMBOL(end_page_writeback);
--- linux-2.6.15/mm/page_alloc.c~	2006-01-09 13:40:03.000000000 -0500
+++ linux-2.6.15/mm/page_alloc.c	2006-01-09 13:40:50.000000000 -0500
@@ -722,6 +722,11 @@ static void fastcall free_hot_cold_page(
 	if (pcp->count >= pcp->high) {
 		free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
 		pcp->count -= pcp->batch;
+	} else if (zone->all_unreclaimable) {
+		spin_lock(&zone->lock);
+		zone->all_unreclaimable = 0;
+		zone->pages_scanned = 0;
+		spin_unlock(&zone->lock);
 	}
 	local_irq_restore(flags);
 	put_cpu();

  reply	other threads:[~2006-01-19 19:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-19 15:11 Out of Memory: Killed process 16498 (java) Andy Chittenden
2006-01-19 19:48 ` Dave Jones [this message]
2006-01-19 22:15   ` Andrew Morton
2006-01-20  8:12     ` Jens Axboe
2006-01-20  8:23       ` Andrew Morton
2006-01-20 12:08         ` Jens Axboe
2006-01-20 12:17           ` Andrew Morton
2006-01-20 12:28             ` Jens Axboe
2006-01-20 12:51               ` Andrew Morton
2006-01-20  1:03   ` Andrew Morton
2006-01-20  1:28     ` Dave Jones
2006-01-20  1:49       ` Andrew Morton
2006-01-21 20:00         ` Dan Aloni
  -- strict thread matches above, loose matches on Subject: below --
2006-01-27 11:53 Andy Chittenden
2006-01-27 14:21 ` Jens Axboe
2006-01-27 14:39   ` Anton Altaparmakov
2006-01-23 10:03 Andy Chittenden
2006-01-23 10:11 ` Jens Axboe
2006-01-21 21:47 Andy Chittenden
2006-01-23  9:27 ` Jens Axboe
     [not found] <89E85E0168AD994693B574C80EDB9C27035561DE@uk-email.terastack.bluearc.com>
2006-01-20 17:39 ` Jens Axboe
     [not found] <89E85E0168AD994693B574C80EDB9C27035560E4@uk-email.terastack.bluearc.com>
2006-01-20 12:37 ` Larry Woodman
     [not found] <89E85E0168AD994693B574C80EDB9C2703555F8E@uk-email.terastack.bluearc.com>
2006-01-19  9:44 ` Andrew Morton
2006-01-19  9:40 Andy Chittenden
2006-01-19  9:41 ` Con Kolivas
2006-01-19  8:43 Andy Chittenden
2006-01-19  8:56 ` Andrew Morton
2006-01-19  9:36   ` Con Kolivas
2006-01-19 20:54 ` Martin Bligh

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=20060119194836.GM21663@redhat.com \
    --to=davej@redhat.com \
    --cc=AChittenden@bluearc.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lwoodman@redhat.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