Messages in this thread Patch in this message | | | Date | Wed, 22 Feb 2006 14:34:09 +0100 | From | Jens Axboe <> | Subject | Re: adding swap workarounds oom - was: Re: Out of Memory: Killed process 16498 (java). |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |