Skip to contentSkip to conversation

Q: blk_queue_bounce_limit

DISCUSSION Manfred Spraul 2 participants 2 messages Jan 13, 2002 – Jan 14, 2002

lore
Share & tools
lore
#0 lore raw

I think the selection of the ISA pool in blk_queue_bounce_limit is wrong:
it switches to the ISA pool if the requested DMA address is equal to 16 MB. I think it must switch if the requested bounce limit is smaller than max_low_pfn.

<<<<<<<
- if (dma_addr == BLK_BOUNCE_ISA) {
+ if (bounce_pfn < blk_max_low_pfn) {

+		BUG_ON(dma_addr < BLK_BOUNCE_ISA);
                init_emergency_isa_pool();
                q->bounce_gfp = GFP_NOIO | GFP_DMA;
        } else
                q->bounce_gfp = GFP_NOHIGHIO;

<<<

Usually both lines are identical, except:
- If only 16 MB are installed, then bouncing to ISA is never needed.
- There could be broken devices that only support DMA to < 512 MB. For such a device no bounce it needed if less than 512 MB is installed, and if more is installed we must bounce to ISA. (since we don't have a 512MB zone).
- Bouncing to less that 16 MB is not supported.

--
Manfred

#1 lore raw
Quoted 16 lines · Manfred Spraul

I think the selection of the ISA pool in blk_queue_bounce_limit is wrong:
it switches to the ISA pool if the requested DMA address is equal to 16 MB. I think it must switch if the requested bounce limit is smaller than max_low_pfn.

<<<<<<<

(quoted diff) +2 -1
-	if (dma_addr == BLK_BOUNCE_ISA) {
+	if (bounce_pfn < blk_max_low_pfn) {
+		BUG_ON(dma_addr < BLK_BOUNCE_ISA);
                init_emergency_isa_pool();
                q->bounce_gfp = GFP_NOIO | GFP_DMA;
        } else
                q->bounce_gfp = GFP_NOHIGHIO;

<<<

Quoted 7 lines

Usually both lines are identical, except:
- If only 16 MB are installed, then bouncing to ISA is never needed.
- There could be broken devices that only support DMA to < 512 MB. For such a device no bounce it needed if less than 512 MB is installed, and if more is installed we must bounce to ISA. (since we don't have a 512MB zone).
- Bouncing to less that 16 MB is not supported.

Yes it's a grey area, I'll add your patch.

Signature · 1 line
Jens Axboe