Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux-foundation.org, Will Deacon <will@kernel.org>,
	linux-rdma <linux-rdma@vger.kernel.org>,
	logang@deltatee.com, Christoph Hellwig <hch@lst.de>,
	murphyt7@tcd.ie
Subject: Re: performance regression noted in v5.11-rc after c062db039f40
Date: Tue, 19 Jan 2021 09:37:47 -0500	[thread overview]
Message-ID: <603D10B9-5089-4CC3-B940-5646881BBA89@oracle.com> (raw)
In-Reply-To: <0f7c344a-00b6-72bc-5c39-c6cdc571211b@linux.intel.com>



> On Jan 18, 2021, at 8:22 PM, Lu Baolu <baolu.lu@linux.intel.com> wrote:
> 
> Do you mind posting the cap and ecap of the iommu used by your device?
> 
> You can get it via sysfs, for example:
> 
> /sys/bus/pci/devices/0000:00:14.0/iommu/intel-iommu# ls
> address  cap  domains_supported  domains_used  ecap  version

[root@manet intel-iommu]# lspci | grep Mellanox
03:00.0 Network controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]
[root@manet intel-iommu]# pwd
/sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/iommu/intel-iommu
[root@manet intel-iommu]# for i in *; do   echo -n $i ": ";   cat $i; done
address : c7ffc000
cap : d2078c106f0466
domains_supported : 65536
domains_used : 62
ecap : f020de
version : 1:0
[root@manet intel-iommu]#


>> Fwiw, this system uses the Intel C612 chipset with Intel(R) Xeon(R)
>> E5-2603 v3 @ 1.60GHz CPUs.
> 
> Can you please also hack a line of code to check the return value of
> iommu_dma_map_sg()?

diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
index baca49fe83af..e811562ead0e 100644
--- a/net/sunrpc/xprtrdma/frwr_ops.c
+++ b/net/sunrpc/xprtrdma/frwr_ops.c
@@ -328,6 +328,7 @@ struct rpcrdma_mr_seg *frwr_map(struct rpcrdma_xprt *r_xprt,
 
        dma_nents = ib_dma_map_sg(ep->re_id->device, mr->mr_sg, mr->mr_nents,
                                  mr->mr_dir);
+       trace_printk("ib_dma_map_sg(%d) returns %d\n", mr->mr_nents, dma_nents);
        if (!dma_nents)
                goto out_dmamap_err;
        mr->mr_device = ep->re_id->device;

During the 256KB iozone test I used before, this trace log is generated:

   kworker/u28:3-1269  [000]   336.054743: bprint:               frwr_map: ib_dma_map_sg(30) returns 1
   kworker/u28:3-1269  [000]   336.054835: bprint:               frwr_map: ib_dma_map_sg(30) returns 1
   kworker/u28:3-1269  [000]   336.055022: bprint:               frwr_map: ib_dma_map_sg(4) returns 1
   kworker/u28:3-1269  [000]   336.055118: bprint:               frwr_map: ib_dma_map_sg(30) returns 1
   kworker/u28:3-1269  [000]   336.055312: bprint:               frwr_map: ib_dma_map_sg(30) returns 1
   kworker/u28:3-1269  [000]   336.055407: bprint:               frwr_map: ib_dma_map_sg(4) returns 1

--
Chuck Lever




  reply	other threads:[~2021-01-19 15:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 21:18 performance regression noted in v5.11-rc after c062db039f40 Chuck Lever
2021-01-12 14:38 ` Will Deacon
2021-01-13  2:25   ` Lu Baolu
2021-01-13 14:07     ` Chuck Lever
2021-01-13 18:30       ` Chuck Lever
2021-01-18 16:18   ` Chuck Lever
2021-01-18 18:00     ` Robin Murphy
2021-01-18 20:09       ` Chuck Lever
2021-01-19  1:22         ` Lu Baolu
2021-01-19 14:37           ` Chuck Lever [this message]
2021-01-20  2:11             ` Lu Baolu
2021-01-20 20:25               ` Chuck Lever
2021-01-21 19:09       ` Chuck Lever
2021-01-22  3:00         ` Lu Baolu
2021-01-22 16:18           ` Chuck Lever
2021-01-22 17:38             ` Robin Murphy
2021-01-22 18:38               ` Chuck Lever
2021-01-24  7:17               ` Lu Baolu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=603D10B9-5089-4CC3-B940-5646881BBA89@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=murphyt7@tcd.ie \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox