Re: adding swap workarounds oom - was: Re: Out of Memory: Killed process 16498 (java).

From: Jens Axboe
Date: Wed Feb 22 2006 - 08:35:57 EST


On Wed, Feb 22 2006, Jens Axboe wrote:
> On Wed, Feb 22 2006, Jens Axboe wrote:
> > 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.
>
> Scratch that, it cannot work on all cases (even if it may fix yours).

Andy, to help debug this further, can you boot with this patch? It dumps
what the kernel sets max_pfn and max_low_pfn too for your machine, in
addition to the dump we tried earlier. I'm a little puzzled about what
is going on here...


diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index bfcde0f..bce6e55 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -637,6 +637,8 @@ void blk_queue_bounce_limit(request_queu
{
unsigned long bounce_pfn = dma_addr >> PAGE_SHIFT;

+ printk("q=%p, dma_addr=%llx, bounce pfn %lu\n",q, dma_addr, bounce_pfn);
+
/*
* 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.
@@ -3501,6 +3503,8 @@ int __init blk_dev_init(void)
blk_max_low_pfn = max_low_pfn;
blk_max_pfn = max_pfn;

+ printk("blk_max_low_pfn=%lu, blk_max_pfn=%lu\n", blk_max_low_pfn, blk_max_pfn);
+
return 0;
}


--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/