All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-rdma <linux-rdma@vger.kernel.org>,
	logang@deltatee.com, Robin Murphy <robin.murphy@arm.com>,
	murphyt7@tcd.ie, iommu@lists.linux-foundation.org,
	Will Deacon <will@kernel.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: performance regression noted in v5.11-rc after c062db039f40
Date: Wed, 20 Jan 2021 10:11:12 +0800	[thread overview]
Message-ID: <1107f22e-c01e-0dbd-4286-3a264b36e4e4@linux.intel.com> (raw)
In-Reply-To: <603D10B9-5089-4CC3-B940-5646881BBA89@oracle.com>

On 1/19/21 10:37 PM, Chuck Lever wrote:
> 
> 
>> 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

MGAW: 101111 (supporting 48-bit address width)
SAGAW: 00100 (supporting 48-bit 4-level page table)

So the calculation of domain->domain.geometry.aperture_end is right.

> 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

This is the result after commit c062db039f40, right? It also looks good
to me. Are you using iotlb strict mode (intel_iommu=strict) or lazy mode
(by default)?

Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: baolu.lu@linux.intel.com, 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: Wed, 20 Jan 2021 10:11:12 +0800	[thread overview]
Message-ID: <1107f22e-c01e-0dbd-4286-3a264b36e4e4@linux.intel.com> (raw)
In-Reply-To: <603D10B9-5089-4CC3-B940-5646881BBA89@oracle.com>

On 1/19/21 10:37 PM, Chuck Lever wrote:
> 
> 
>> 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

MGAW: 101111 (supporting 48-bit address width)
SAGAW: 00100 (supporting 48-bit 4-level page table)

So the calculation of domain->domain.geometry.aperture_end is right.

> 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

This is the result after commit c062db039f40, right? It also looks good
to me. Are you using iotlb strict mode (intel_iommu=strict) or lazy mode
(by default)?

Best regards,
baolu

  reply	other threads:[~2021-01-20  2:19 UTC|newest]

Thread overview: 36+ 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-08 21:18 ` Chuck Lever
2021-01-12 14:38 ` Will Deacon
2021-01-12 14:38   ` Will Deacon
2021-01-13  2:25   ` Lu Baolu
2021-01-13  2:25     ` Lu Baolu
2021-01-13 14:07     ` Chuck Lever
2021-01-13 14:07       ` Chuck Lever
2021-01-13 18:30       ` Chuck Lever
2021-01-13 18:30         ` Chuck Lever
2021-01-18 16:18   ` Chuck Lever
2021-01-18 16:18     ` Chuck Lever
2021-01-18 18:00     ` Robin Murphy
2021-01-18 18:00       ` Robin Murphy
2021-01-18 20:09       ` Chuck Lever
2021-01-18 20:09         ` Chuck Lever
2021-01-19  1:22         ` Lu Baolu
2021-01-19  1:22           ` Lu Baolu
2021-01-19 14:37           ` Chuck Lever
2021-01-19 14:37             ` Chuck Lever
2021-01-20  2:11             ` Lu Baolu [this message]
2021-01-20  2:11               ` Lu Baolu
2021-01-20 20:25               ` Chuck Lever
2021-01-20 20:25                 ` Chuck Lever
2021-01-21 19:09       ` Chuck Lever
2021-01-21 19:09         ` Chuck Lever
2021-01-22  3:00         ` Lu Baolu
2021-01-22  3:00           ` Lu Baolu
2021-01-22 16:18           ` Chuck Lever
2021-01-22 16:18             ` Chuck Lever
2021-01-22 17:38             ` Robin Murphy
2021-01-22 17:38               ` Robin Murphy
2021-01-22 18:38               ` Chuck Lever
2021-01-22 18:38                 ` Chuck Lever
2021-01-24  7:17               ` Lu Baolu
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=1107f22e-c01e-0dbd-4286-3a264b36e4e4@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=chuck.lever@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.