Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp703754imw; Fri, 8 Jul 2022 10:09:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTO8n3dcy6CZwFyDhEeCj27jned1xcF/1iBixXu1GYCM/0Hz4kA4OcyFvNSqFv+W+80Z6a X-Received: by 2002:a63:1a21:0:b0:412:b103:97a2 with SMTP id a33-20020a631a21000000b00412b10397a2mr4180631pga.12.1657300142993; Fri, 08 Jul 2022 10:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657300142; cv=none; d=google.com; s=arc-20160816; b=v1r6yGEGxblUdn1SW2jnseFIt/xHZ98j7lOJlkw39H+UqfRh+xi2vIczvW53GeSMDw P7Sxy7r0aKuL9N15kvFo31ZpqZicaGB1x6F3nyWIdYkPxz03TjzsPwIa8R/JHqXqBFvU 88weL8tJ3/7dtI/IbrSjlPLy+7cgRMicOYIrAuijRPEsEhSVyw/V/paouGnQHfsnGFXM zRlnZCNxmLHnsre8nicAARc6yDkLZUsJjMpFx+nTFq09S5sFP/8wkCp+9q6ir5MYSxAm PWz8F21yeYC08zPXP2XNQ59rg44mZmf1qKFBdqmmunCfOnSiBao7sHtfOGbmYgzoV7+D TVcw== 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=pXTkXBNCMu+prUOn4YfrDG93fMf/cWiLrsV40LwxVlo=; b=mb4nyfLrkbTYLwD5+FR17GlPazt90RPam9JWpG1WbcuGiTdq2OSxKW78PBk8tTYNg9 +yfcGUQVyF7y/n+WRRp0bu1fYK6Czyv/OyDC6VrC33chJUR8zdkPE8I4C5Al0/bmA/v7 QuHafxTtlvbLOhFE6F/5Ay0fhYpYsSbrHkYzB1RYDvzVRGkeiUHpogC9SiGUS3jqjzBC 4zjkEnXqW7zSDU0oh8hzU5Pmy9IKbf6Dgziv434m+IAc9eDbp76eRGCoH8XmCsMAE1yy zgqlwGd01uZcJv5rLqhqbrdNn7jxojaW1s4tXOEauXqCfWJN1w/2HpiPiBoKOvzVwAw0 McAQ== 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 l19-20020a170902f69300b0016c1fdaa378si3634727plg.362.2022.07.08.10.08.50; Fri, 08 Jul 2022 10:09:02 -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 S238172AbiGHQRR (ORCPT + 99 others); Fri, 8 Jul 2022 12:17:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238559AbiGHQRN (ORCPT ); Fri, 8 Jul 2022 12:17:13 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5026F7B367; Fri, 8 Jul 2022 09:17:11 -0700 (PDT) Received: from fraeml745-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Lfdbm5bSbz686M3; Sat, 9 Jul 2022 00:12:52 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml745-chm.china.huawei.com (10.206.15.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 8 Jul 2022 18:17:08 +0200 Received: from [10.195.34.23] (10.195.34.23) 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; Fri, 8 Jul 2022 17:17:07 +0100 Message-ID: <5fd4814a-81b1-0e71-58e0-57a747eb684e@huawei.com> Date: Fri, 8 Jul 2022 17:17:06 +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 v5 0/5] DMA mapping changes for SCSI core To: "Martin K. Petersen" , Christoph Hellwig CC: , , , , , , , , , , , , References: <1656590892-42307-1-git-send-email-john.garry@huawei.com> <20220706134447.GA23753@lst.de> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.195.34.23] X-ClientProxiedBy: lhreml748-chm.china.huawei.com (10.201.108.198) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.6 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 07/07/2022 21:35, Martin K. Petersen wrote: > Christoph, > >> Yes, I've mostly been waiting for an ACK from Martin. > Sorry, I'm on vacation this week. The series looks OK to me although I > do agree that it would be great if the max was reflected in the queue's > hard limit and opt in the soft limit. Ah, I think that I misunderstood Damien's question. I thought he was asking why not keep shost max_sectors at dma_max_mapping_size() and then init each sdev request queue max hw sectors at dma_opt_mapping_size(). But he seems that you want to know why not have the request queue max sectors at dma_opt_mapping_size(). The answer is related to meaning of dma_opt_mapping_size(). If we get any mappings which exceed this size then it can have a big dma mapping performance hit. So I set max hw sectors at this ‘opt’ mapping size to ensure that we get no mappings which exceed this size. Indeed, I think max sectors is 128Kb today for my host, which would be same as dma_opt_mapping_size() value with an IOMMU enabled. And I find that only a small % of request size may exceed this 128kb size, but it still has a big performance impact. > > Acked-by: Martin K. Petersen Thanks, John