mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andy Chittenden <AChittenden@bluearc.com>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>,
	Andrew Morton <akpm@osdl.org>,
	davej@redhat.com, linux-kernel@vger.kernel.org,
	lwoodman@redhat.com
Subject: Re: adding swap workarounds oom - was: Re: Out of Memory: Killed process 16498 (java).
Date: Wed, 22 Feb 2006 14:34:09 +0100	[thread overview]
Message-ID: <20060222133409.GY8852@suse.de> (raw)
In-Reply-To: <89E85E0168AD994693B574C80EDB9C2703758C89@uk-email.terastack.bluearc.com>

On Wed, Feb 22 2006, Andy Chittenden wrote:
> Jens
> 
> > On Fri, Feb 03 2006, Andy Chittenden wrote:
> > > Which brings me back to the original problem I reported: 
> > any progress on
> > > a patch for that? FYI I often come in the morning to find processes
> > > killed.
> > 
> > Nope sorry, I'll probably get to it at the start of next week.
> > 
> > -- 
> > Jens Axboe
> > 
> 
> Any progress? This is getting very irritating especially when processes
> get killed during the day when I link a big executable.

Can you give this a shot? Untested, as I cannot reproduce it here.

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 41387f5..a6cfe7d 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -631,21 +631,15 @@ static inline int ordered_bio_endio(stru
  **/
 void blk_queue_bounce_limit(request_queue_t *q, u64 dma_addr)
 {
-	unsigned long bounce_pfn = dma_addr >> PAGE_SHIFT;
+	q->bounce_gfp = GFP_NOIO;
 
-	/*
-	 * set appropriate bounce gfp mask -- unfortunately we don't have a
-	 * full 4GB zone, so we have to resort to low memory for any bounces.
-	 * ISA has its own < 16MB zone.
-	 */
-	if (bounce_pfn < blk_max_low_pfn) {
-		BUG_ON(dma_addr < BLK_BOUNCE_ISA);
+	if (dma_addr < ISA_DMA_THRESHOLD) {
 		init_emergency_isa_pool();
-		q->bounce_gfp = GFP_NOIO | GFP_DMA;
-	} else
-		q->bounce_gfp = GFP_NOIO;
+		q->bounce_gfp |= GFP_DMA;
+	} else if (dma_addr < DMA_32BIT_MASK)
+		q->bounce_gfp |= GFP_DMA32;
 
-	q->bounce_pfn = bounce_pfn;
+	q->bounce_pfn = dma_addr >> PAGE_SHIFT;
 }
 
 EXPORT_SYMBOL(blk_queue_bounce_limit);

-- 
Jens Axboe


  reply	other threads:[~2006-02-22 13:34 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22 10:43 Andy Chittenden
2006-02-22 13:34 ` Jens Axboe [this message]
2006-02-22 13:35   ` Jens Axboe
2006-02-22 13:38     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2006-03-03  9:16 Andy Chittenden
2006-03-02 10:46 Andy Chittenden
2006-03-02 11:10 ` Jens Axboe
2006-03-02 12:21   ` Andi Kleen
2006-03-02 12:26     ` Jens Axboe
     [not found] <89E85E0168AD994693B574C80EDB9C270393C141@uk-email.terastack.bluearc.com>
2006-03-01 15:57 ` Jens Axboe
2006-03-01 14:40 Andy Chittenden
2006-03-01 13:34 Andy Chittenden
2006-03-01 13:41 ` Jens Axboe
2006-03-01 14:05   ` Andi Kleen
2006-03-01 14:18     ` Jens Axboe
2006-03-01 14:26       ` Andi Kleen
2006-03-01 14:34         ` Jens Axboe
2006-03-01 14:41           ` Andi Kleen
2006-03-01 15:00             ` Jens Axboe
2006-03-01 10:47 Andy Chittenden
2006-03-01 12:15 ` Jens Axboe
2006-03-01 12:19   ` Jens Axboe
2006-03-01 12:23     ` Andi Kleen
2006-03-01 12:25       ` Jens Axboe
2006-03-01  9:42 Andy Chittenden
2006-03-01  9:55 ` Jens Axboe
2006-02-28 10:27 Andy Chittenden
2006-02-28 10:29 ` Jens Axboe
2006-02-28 10:10 Andy Chittenden
2006-02-28 10:20 ` Jens Axboe
2006-02-27 16:39 Andy Chittenden
2006-02-27 14:50 Andy Chittenden
2006-02-27 14:56 ` Jens Axboe
     [not found] <89E85E0168AD994693B574C80EDB9C270393BF0E@uk-email.terastack.bluearc.com>
2006-02-27 14:28 ` Jens Axboe
2006-02-24  9:33 Andy Chittenden
2006-02-03 13:56 Andy Chittenden
2006-02-03 14:00 ` Jens Axboe
2006-01-27 11:53 Andy Chittenden
2006-01-27 14:21 ` Jens Axboe
2006-01-27 14:39   ` Anton Altaparmakov
2006-02-03  9:20     ` adding swap workarounds oom - was: " Anton Altaparmakov
2006-02-03  9:26       ` Andrew Morton
2006-02-03 11:01         ` Anton Altaparmakov
2006-02-03 13:54           ` Jens Axboe

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=20060222133409.GY8852@suse.de \
    --to=axboe@suse.de \
    --cc=AChittenden@bluearc.com \
    --cc=aia21@cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=davej@redhat.com \
    --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

Powered by JetHome