Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5416939pxv; Wed, 21 Jul 2021 05:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdyWzhhCJHKXAg2j6/D1b32W8IIuWBDKcRsARRCEv+9QJVYwzHRcDMm0aqIKEDOaJe0KVQ X-Received: by 2002:adf:d235:: with SMTP id k21mr42595193wrh.222.1626869193336; Wed, 21 Jul 2021 05:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626869193; cv=none; d=google.com; s=arc-20160816; b=XY0NF3YWNLQuHVwTOUP4tChwcfJb6skF5XzQvKQJD9/3aZVJcfyQf4+705EKCLGGcl 228rwZnK43q2c/Ij7AAg5IHI9WvGN9FH0o2zw9RoJxSmSBwoq0Sbdwzf6v3fPNPMeghK QqyABUaSVnCzZ1z9D8a/FDmv/28kdc2S9Gk1rxYDs9CxLC6QI0NLhqI6vHSKabPm7ICW h0c0p6y1umaxo8oVtCqN/imGXtNazp+sv4bFPDE2l8FNza+TizL1dvCriuwhqtaU6idl H0X3wP4vNR0aarMr+1uKUgOVPs6D82HMb4N5sEcciUPSfVrsFq+rQ6yt/Dtvfr4zTxBR vjGA== 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=gxJfZWLtNPAs2shHJ9IAWHN7TfwnN9A2aOkk0cTcs2k=; b=tNPUE04gixj+Cao3okHuUjdzYT+9v2+32iEl23C2iWQn0XkBnXDZnlVHTloKnqspTr P15TYZOT/LhkwjKkczIlcaagCGg1xJMh6pxvdE0tuicHxzT22oYN5sNI7e22hhUpfkeP Ayfwj8L8iO8wBpVJW2ugaRRX42Qr5VzYq3XqBtLsZA5Th4DgFynMRx8xPwqwzNddqRGG e5UlP0T8/r4aLz2nWsxfKBrX91vs8dWz3lI0upiwpBRsNuOFVcHhBhpRfG2IFBccG6Jr nYV1Mio7kIm/Y5zgEquAIE7NQbpkYnDh54RSXDWsvPnR0y5Ikt9Om7UWiH1WE5m7OxNX E27g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OrAiCN13; 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 s18si32890721eji.655.2021.07.21.05.06.10; Wed, 21 Jul 2021 05:06:33 -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=OrAiCN13; 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 S233920AbhGULXd (ORCPT + 99 others); Wed, 21 Jul 2021 07:23:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32190 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238073AbhGULSR (ORCPT ); Wed, 21 Jul 2021 07:18:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626868733; 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=gxJfZWLtNPAs2shHJ9IAWHN7TfwnN9A2aOkk0cTcs2k=; b=OrAiCN13WdYjaPIEW3eOXv3P3hlWYd6vjjeBPWFpF4gYV2DqZcsw+RaeiRauAHOSUtNvAX z0Wry/DTFR7uwsRT691G2//1FWJyTK1URuXxEN7l3dMzjo+1axdkh3lIxESOd5jeXEAkFc +APDZCy18Yd34nBmutTODFHOjn41lRc= 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-125-GMMTpxDdNDy79OlVI1KIHQ-1; Wed, 21 Jul 2021 07:58:51 -0400 X-MC-Unique: GMMTpxDdNDy79OlVI1KIHQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 17430100F79B; Wed, 21 Jul 2021 11:58:50 +0000 (UTC) Received: from T590 (ovpn-13-178.pek2.redhat.com [10.72.13.178]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4EFFE1B5C2; Wed, 21 Jul 2021 11:58:40 +0000 (UTC) Date: Wed, 21 Jul 2021 19:58:36 +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.13 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. Yeah, that might be one improvement, but not checked it since code base is changed. > > > > > [root@ampere-mtjade-04 ~]# taskset -c 80 ~/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=138MiB/s][r=35.4k IOPS][eta 00m:00s] > > test: (groupid=0, jobs=1): err= 0: pid=3063: Wed Jul 21 05:55:31 2021 > > read: IOPS=35.4k, BW=138MiB/s (145MB/s)(1383MiB/10001msec) > > I can try similar on our arm64 board when I get a chance. The issue I reported is this one. Thanks, Ming