Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp176881iol; Thu, 9 Jun 2022 01:16:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrhEeJrXx1Wn9jV583c0TEV3ZGFiOJW/4gQat/wZZHjLYHcvMmaaIP1D5tEpbfrme5Doul X-Received: by 2002:a05:6402:11d2:b0:42d:e68a:eae0 with SMTP id j18-20020a05640211d200b0042de68aeae0mr43399941edw.111.1654762597895; Thu, 09 Jun 2022 01:16:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654762597; cv=none; d=google.com; s=arc-20160816; b=CRpWJgaeAYAotlmjcWCFX3+EwgzOCQqqfh3L0ZK3erRAhWAJ46azJFkyJnvDEyCHnx JYstc8svUWvGIZMz/7h6KAHXN4M8NFxv+HRWNXR9L2UQl1kXTLmuw2aDbhbK1ra2U5eK MCoIESvvlFPNclF35N0arjajpY4pTP17FJJ6Ovpx8kOyXzHbXnxVsXSIXyyHN9DkwKTh 0TiHaHGvD2wQ9lAPQgI3Hy9jC0YCQzXL5GbA4KjnbCSmtIo/Y1u4cJch4+ADpFi1I65w akpgERUXZ4sbLxbBVEoIl97vOac4WLb9JzI7HEXYfeVct7XY4t1KWbx96oa78soMa2p+ YtCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=xff76ScI6ppVmABkQS8flkXZo43tOBsUVR01LkHLGsc=; b=pbDgY81gKcfa67SG13F8jOdCo9oOApjTjWwSzWQhB+gGIb3yqiDcbyk3ZC3T5EDdo4 Nzs3ss98IPnxD45TZ91OCs9vcvzAT1fRPGyf/I1uwakZl6qcID1E8Cj+HyohmB+7vquq yD/ZQxmnWkKj2ZIIU3kAv3iHmAnv0K/ube79y3fiZtV3wkRd7DYfJenAIpg2CLtRGIGb IJauD4tIsSOwlYRP40d2RCKCl/UH2Wak+vuM/wPH8eRBODFW9b+qUvxafvmUMnQ65hRK iyHlr3iMQ1ydaDNMKiW/DWMkyt1Lzy8YH7koCXZ6/Tl/7++yHCw9zzgBblA7uf1Mp3cB mITA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a056402525600b004314e4f40b3si15726779edd.604.2022.06.09.01.16.11; Thu, 09 Jun 2022 01:16:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240412AbiFIIBC (ORCPT + 99 others); Thu, 9 Jun 2022 04:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240415AbiFIIBA (ORCPT ); Thu, 9 Jun 2022 04:01:00 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED075FDB; Thu, 9 Jun 2022 01:00:54 -0700 (PDT) Received: from fraeml743-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LJbxw3Jf7z6881w; Thu, 9 Jun 2022 15:56:04 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml743-chm.china.huawei.com (10.206.15.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 10:00:52 +0200 Received: from [10.47.88.201] (10.47.88.201) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 09:00:51 +0100 Message-ID: <5b214e95-dd95-551a-496e-a2139a74e8eb@huawei.com> Date: Thu, 9 Jun 2022 09:00:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3 3/4] scsi: core: Cap shost max_sectors according to DMA optimum mapping limits To: Bart Van Assche , , , , , , , , CC: , , , , , , , References: <1654507822-168026-1-git-send-email-john.garry@huawei.com> <1654507822-168026-4-git-send-email-john.garry@huawei.com> <31417477-953d-283e-808e-cf8701e820a8@huawei.com> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.88.201] X-ClientProxiedBy: lhreml727-chm.china.huawei.com (10.201.108.78) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/06/2022 22:07, Bart Van Assche wrote: > On 6/8/22 10:50, John Garry wrote: >> Please note that this limit only applies if we have an IOMMU enabled >> for the scsi host dma device. Otherwise we are limited by dma direct >> or swiotlb max mapping size, as before. > > SCSI host bus adapters that support 64-bit DMA may support much larger > transfer sizes than 128 KiB. Indeed, and that is my problem today, as my storage controller is generating DMA mapping lengths which exceeds 128K and they slow everything down. If you say that SRP enjoys best peformance with larger transfers then can you please test this with an IOMMU enabled (iommu group type DMA or DMA-FQ)? Thanks, John