Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp336132pxv; Thu, 22 Jul 2021 01:00:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg6/Ayaaw5MZnIO2aNI9y7WoL1Np7CLmwHnf6MxrIEpZSDV3ajvUf/EsEh1H4Wt3+hGalc X-Received: by 2002:a17:906:af87:: with SMTP id mj7mr42114230ejb.397.1626940814937; Thu, 22 Jul 2021 01:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626940814; cv=none; d=google.com; s=arc-20160816; b=PdsnXz4whseHZKekZAIjjYAJ/xG8zlopVPT55LIQidc8thhLcwexlOliQW8pMVfqzn b3L+p/gX2h54wzqy9fuAN2aoFNO+VLw16ij/chPnL/1SNtMtWwobjwNse4OP92NlcL+F 3WI4H4jJSmv4XVZ/ecUGuzEpUR50QHwo8LmDSDoByE6GlyAI64Bo4k7ILeXfrMg7L7Mo MBTfjKr8upR7pqzi657/5ognUXIC80xQYMyqEGDxYHIayDxYhKLSvL12YhfnTJxlBAhb eRIdgHIqy64QDpkDb56jknEG6MIhPA1aU/LEXj6CkW7D2LcpqFwemVkRYIOZmC9cj0zZ jYlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6lwGJN8TiFLyvyvEI71qHXGC7kR0F74D2az+cv8IX3c=; b=seZy1suadwf3KfkuTAW8Ed7xUT7kiYwZnhIHf+ouzfXwfX23nk4VQub2q2zkE8XNhJ EOmIjhpAldsqERuDm2tRmqiR9ira2G+qZevQkAqB7CyJF3+Yr4yHfd47260OZMWi7OFd GCvtmRtdpatFqW0QKByzlTmGogaLeal7u/zcHrh+JMKJ6GdmqntuRZJPTZYBulu7J7Wb /UySkjszogFTlp4dKx3CNnedo5RSNK2ghn0Ha7YTU5uODIoD1XeN/vv/guvqA6HCe3qq O+sExUb35i1J1A3MyaIhacyB0q+aE7zSIfu/vkXDWwBRj0I8x404jR2ATrP9f/vYtI/C 26ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HB0VKaEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd21si23685415edb.593.2021.07.22.00.59.51; Thu, 22 Jul 2021 01:00:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HB0VKaEC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230499AbhGVHRq (ORCPT + 99 others); Thu, 22 Jul 2021 03:17:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59198 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229642AbhGVHRp (ORCPT ); Thu, 22 Jul 2021 03:17:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626940701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6lwGJN8TiFLyvyvEI71qHXGC7kR0F74D2az+cv8IX3c=; b=HB0VKaECu0q+wwwPr0ruUJk4JWWvcuQ03YjJ2+kpvFX4Ly9VHkdkGrBnt54xANSKWCyLT+ QNbEB1eWKop8sstuH74bgjapYfnTrBpkp5IlpIHYYDL0revlJgYKEUiq3rCcPyqGaapgn+ WZou1OkU0csnRR644/56z4x+lJOgXW0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-284--TOyIPhhNMqqiunAANAukQ-1; Thu, 22 Jul 2021 03:58:17 -0400 X-MC-Unique: -TOyIPhhNMqqiunAANAukQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4AB9D93923; Thu, 22 Jul 2021 07:58:16 +0000 (UTC) Received: from T590 (ovpn-13-219.pek2.redhat.com [10.72.13.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE72160CA1; Thu, 22 Jul 2021 07:58:08 +0000 (UTC) Date: Thu, 22 Jul 2021 15:58:04 +0800 From: Ming Lei To: John Garry Cc: Robin Murphy , iommu@lists.linux-foundation.org, Will Deacon , linux-arm-kernel@lists.infradead.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [bug report] iommu_dma_unmap_sg() is very slow then running IO from remote numa node Message-ID: References: <23e7956b-f3b5-b585-3c18-724165994051@arm.com> <74537f9c-af5f-cd84-60ab-49ca6220310e@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 21, 2021 at 12:07:22PM +0100, John Garry wrote: > On 21/07/2021 10:59, Ming Lei wrote: > > > I have now removed that from the tree, so please re-pull. > > Now the kernel can be built successfully, but not see obvious improvement > > on the reported issue: > > > > [root@ampere-mtjade-04 ~]# uname -a > > Linux ampere-mtjade-04.khw4.lab.eng.bos.redhat.com 5.14.0-rc2_smmu_fix+ #2 SMP Wed Jul 21 05:49:03 EDT 2021 aarch64 aarch64 aarch64 GNU/Linux > > > > [root@ampere-mtjade-04 ~]# taskset -c 0 ~/git/tools/test/nvme/io_uring 10 1 /dev/nvme1n1 4k > > + fio --bs=4k --ioengine=io_uring --fixedbufs --registerfiles --hipri --iodepth=64 --iodepth_batch_submit=16 --iodepth_batch_complete_min=16 --filename=/dev/nvme1n1 --direct=1 --runtime=10 --numjobs=1 --rw=randread --name=test --group_reporting > > test: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=64 > > fio-3.27 > > Starting 1 process > > Jobs: 1 (f=1): [r(1)][100.0%][r=1503MiB/s][r=385k IOPS][eta 00m:00s] > > test: (groupid=0, jobs=1): err= 0: pid=3143: Wed Jul 21 05:58:14 2021 > > read: IOPS=384k, BW=1501MiB/s (1573MB/s)(14.7GiB/10001msec) > > I am not sure what baseline you used previously, but you were getting 327K > then, so at least this would be an improvement. Looks the improvement isn't from your patches, please see the test result on v5.14-rc2: [root@ampere-mtjade-04 ~]# uname -a Linux ampere-mtjade-04.khw4.lab.eng.bos.redhat.com 5.14.0-rc2_linus #3 SMP Thu Jul 22 03:41:24 EDT 2021 aarch64 aarch64 aarch64 GNU/Linux [root@ampere-mtjade-04 ~]# taskset -c 0 ~/git/tools/test/nvme/io_uring 20 1 /dev/nvme1n1 4k + fio --bs=4k --ioengine=io_uring --fixedbufs --registerfiles --hipri --iodepth=64 --iodepth_batch_submit=16 --iodepth_batch_complete_min=16 --filename=/dev/nvme1n1 --direct=1 --runtime=20 --numjobs=1 --rw=randread --name=test --group_reporting test: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=64 fio-3.27 Starting 1 process Jobs: 1 (f=1): [r(1)][100.0%][r=1489MiB/s][r=381k IOPS][eta 00m:00s] test: (groupid=0, jobs=1): err= 0: pid=3099: Thu Jul 22 03:53:04 2021 read: IOPS=381k, BW=1487MiB/s (1559MB/s)(29.0GiB/20001msec) thanks, Ming