mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: "largret@gmail.com" <largret@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Kernel panic when compiling with SMP support
Date: Sat, 25 Feb 2006 01:41:40 -0500	[thread overview]
Message-ID: <200602250144_MC3-1-B93A-63E9@compuserve.com> (raw)

In-Reply-To: <1140732949.5733.13.camel@shogun.daga.dyndns.org>

On Thu, 23 Feb 2006 at 14:15:49 -0800, Chris Largret wrote:

> While tinkering with this the last couple days, I've started to notice
> that the infamous OOM killer is running loose when I enable SMP. dmesg
> is filled with messages like this (this is from the boot-up scripts and
> I should have more than enough memory):
> 
> 
> oom-killer: gfp_mask=0xd1, order=3
> 
> Call Trace: <ffffffff8104ed46>{out_of_memory+58}
> <ffffffff8104ff30>{__alloc_pages+534}
>        <ffffffff8104ffee>{__get_free_pages+48} <ffffffff8117d8e9>{dma_mem_alloc+31}
>        <ffffffff81183e70>{floppy_open+348} <ffffffff81072125>{do_open+172}
>        <ffffffff810724b4>{blkdev_open+0} <ffffffff810724dc>{blkdev_open

 It wants 32K of contiguous DMA memory.  You have 44K free but it's probably
not contiguous.

 Maybe this patch from Jens Axboe would help?

=============================================================================

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);
-- 
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert

             reply	other threads:[~2006-02-25  6:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-25  6:41 Chuck Ebbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-02-23  6:30 Chuck Ebbert
2006-02-23 22:15 ` Chris Largret
2006-02-21  7:03 Chuck Ebbert
2006-02-22  5:56 ` Chris Largret
2006-02-20 12:07 Chris Largret

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=200602250144_MC3-1-B93A-63E9@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=largret@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®