Re: [PATCH 1/2] mtip32xx: Don't bounce IO requests
From: Felipe Franciosi
Date: Wed Mar 12 2014 - 13:44:45 EST
On Wed, Mar 12, 2014 at 5:19 PM, Jens Axboe <axboe@xxxxxxxxx> wrote:
> On 03/12/2014 11:18 AM, David Vrabel wrote:
>>
>> On 12/03/14 17:08, Felipe Franciosi wrote:
>>>
>>> On Wed, Mar 12, 2014 at 4:16 PM, Jens Axboe <axboe@xxxxxxxxx> wrote:
>>>>
>>>>
>>>> On 03/12/2014 10:05 AM, Felipe Franciosi wrote:
>>>>>
>>>>>
>>>>> This device support 64-bit DMA and therefore no IO requests needs
>>>>> bouncing.
>>>>> On 32-bit systems, blk_queue_bounce() will bounce all IO requests with
>>>>> high
>>>>> mem pages. This makes performance really really bad.
>>
>> [...]
>>>>>
>>>>> --- a/drivers/block/mtip32xx/mtip32xx.c
>>>>> +++ b/drivers/block/mtip32xx/mtip32xx.c
>>>>> @@ -4082,8 +4082,6 @@ static void mtip_make_request(struct
>>>>> request_queue *queue, struct bio *bio)
>>>>>
>>>>> sg = mtip_hw_get_scatterlist(dd, &tag, unaligned);
>>>>> if (likely(sg != NULL)) {
>>>>> - blk_queue_bounce(queue, &bio);
>>>>> -
>>>>> if (unlikely((bio)->bi_vcnt > MTIP_MAX_SG)) {
>>>>> dev_warn(&dd->pdev->dev,
>>>>> "Maximum number of SGL entries
>>>>> exceeded\n");
>>>>
>>>>
>>>>
>>>> That seems to be because the driver forgets to set the DMA
>>>> capabilities. It needs a blk_queue_bounce_limit() call when it sets up
>>>> the queue.
>>>
>>>
>>> Hmm... I see what you are saying. David, would you like to comment?
>>
>>
>> Yes, it should also call blk_queue_bounce_limit(..., BLK_BOUNCE_ANY) in
>> mtip_block_initialize() as well.
>>
>> But, only one other driver calls blk_queue_bounce() so it's difficult to
>> see why this driver would need a call here.
>
>
> That's because most other drivers hook in the appropriate place, and the
> blk_queue_bounce() is then done by the block layer.
>
> --
> Jens Axboe
>
I'll add the blk_queue_bounce_limit() on the initialisation, test it
out and submit a v2 tomorrow.
Cheers,
Felipe
--
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/