From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f50.google.com ([209.85.214.50]:36859 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753531AbcGVM3w (ORCPT ); Fri, 22 Jul 2016 08:29:52 -0400 Received: by mail-it0-f50.google.com with SMTP id f6so35717913ith.1 for ; Fri, 22 Jul 2016 05:29:52 -0700 (PDT) MIME-Version: 1.0 From: Muni Sekhar Date: Fri, 22 Jul 2016 17:59:51 +0530 Message-ID: Subject: Test throughput on PCIe interface To: linux-pci@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-pci-owner@vger.kernel.org List-ID: Hi All, We have xilinx PCIe endpoint with DMA reference block. The DMA-REF block provides a mechanism to DMA(also supports Scatter-Gather DMA) transfer data at the maximum rate between host (CPU) memory and a FIFO in the DMA-REF block. DMA-REF block provides the loopback. The intention is to use this block in production and self-test, to check that the PCIe bus is operating at the expected maximum transfer speed. Does kernel has any standard utilities to test throughput on PCIe interface? -- Thanks, Sekhar From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: MIME-Version: 1.0 In-Reply-To: <20160722161406.GC20646@localhost> References: <20160722161406.GC20646@localhost> Date: Sat, 23 Jul 2016 21:12:16 +0530 Message-ID: Subject: Re: Test throughput on PCIe interface From: Muni Sekhar To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Ingo Molnar , Alexander Shishkin , linux-kernel@vger.kernel.org, Stephane Eranian , Arnaldo Carvalho de Melo , Peter Zijlstra Content-Type: multipart/alternative; boundary=94eb2c05541847e8b705384f6554 List-ID: --94eb2c05541847e8b705384f6554 Content-Type: text/plain; charset=UTF-8 On 22 Jul 2016 21:44, "Bjorn Helgaas" wrote: > > [+cc perf folks] > > On Fri, Jul 22, 2016 at 05:59:51PM +0530, Muni Sekhar wrote: > > Hi All, > > > > > > We have xilinx PCIe endpoint with DMA reference block. > > > > > > The DMA-REF block provides a mechanism to DMA(also supports > > Scatter-Gather DMA) transfer data at the maximum rate between host > > (CPU) memory and a FIFO in the DMA-REF block. > > > > > > DMA-REF block provides the loopback. The intention is to use this > > block in production and self-test, to check that the PCIe bus is > > operating at the expected maximum transfer speed. > > > > > > Does kernel has any standard utilities to test throughput on PCIe interface? > > I know some PCIe controllers devices do have performance monitors, and > perf might support some of them, but I don't know any details. > Hi Bjorn, Thanks for the reply. I will check the perf code. Also I am looking for the sample kernel driver code which does DMA and Scatter-Gather DMA transfers on PCIe endpoint. Reference to any example kernel code is greatly appreciated. > Bjorn --94eb2c05541847e8b705384f6554 Content-Type: text/html; charset=UTF-8


On 22 Jul 2016 21:44, "Bjorn Helgaas" <helgaas@kernel.org> wrote:
>
> [+cc perf folks]
>
> On Fri, Jul 22, 2016 at 05:59:51PM +0530, Muni Sekhar wrote:
> > Hi All,
> >
> >
> > We have xilinx PCIe endpoint with DMA reference block.
> >
> >
> > The DMA-REF block provides a mechanism to DMA(also supports
> > Scatter-Gather DMA) transfer data at the maximum rate between host
> > (CPU) memory and a FIFO in the DMA-REF block.
> >
> >
> > DMA-REF block provides the loopback. The intention is to use this
> > block in production and self-test, to check that the PCIe bus is
> > operating at the expected maximum transfer speed.
> >
> >
> > Does kernel has any standard utilities to test throughput on PCIe interface?
>
> I know some PCIe controllers devices do have performance monitors, and
> perf might support some of them, but I don't know any details.
>
Hi Bjorn,
Thanks for the reply. I will check the perf code.

Also I am looking for the sample kernel driver code which does DMA and Scatter-Gather DMA transfers on PCIe endpoint. Reference to any example kernel code is greatly appreciated.

> Bjorn

--94eb2c05541847e8b705384f6554-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.136]:54772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbcGVQOK (ORCPT ); Fri, 22 Jul 2016 12:14:10 -0400 Date: Fri, 22 Jul 2016 11:14:06 -0500 From: Bjorn Helgaas To: Muni Sekhar Cc: linux-pci@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , linux-kernel@vger.kernel.org, Stephane Eranian Subject: Re: Test throughput on PCIe interface Message-ID: <20160722161406.GC20646@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-pci-owner@vger.kernel.org List-ID: [+cc perf folks] On Fri, Jul 22, 2016 at 05:59:51PM +0530, Muni Sekhar wrote: > Hi All, > > > We have xilinx PCIe endpoint with DMA reference block. > > > The DMA-REF block provides a mechanism to DMA(also supports > Scatter-Gather DMA) transfer data at the maximum rate between host > (CPU) memory and a FIFO in the DMA-REF block. > > > DMA-REF block provides the loopback. The intention is to use this > block in production and self-test, to check that the PCIe bus is > operating at the expected maximum transfer speed. > > > Does kernel has any standard utilities to test throughput on PCIe interface? I know some PCIe controllers devices do have performance monitors, and perf might support some of them, but I don't know any details. Bjorn From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Tue, 2 Aug 2016 15:22:48 +0200 From: Peter Zijlstra To: Bjorn Helgaas Cc: Muni Sekhar , linux-pci@vger.kernel.org, Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , linux-kernel@vger.kernel.org, Stephane Eranian Subject: Re: Test throughput on PCIe interface Message-ID: <20160802132248.GJ6862@twins.programming.kicks-ass.net> References: <20160722161406.GC20646@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20160722161406.GC20646@localhost> List-ID: On Fri, Jul 22, 2016 at 11:14:06AM -0500, Bjorn Helgaas wrote: > [+cc perf folks] > > On Fri, Jul 22, 2016 at 05:59:51PM +0530, Muni Sekhar wrote: > > Hi All, > > > > > > We have xilinx PCIe endpoint with DMA reference block. > > > > > > The DMA-REF block provides a mechanism to DMA(also supports > > Scatter-Gather DMA) transfer data at the maximum rate between host > > (CPU) memory and a FIFO in the DMA-REF block. > > > > > > DMA-REF block provides the loopback. The intention is to use this > > block in production and self-test, to check that the PCIe bus is > > operating at the expected maximum transfer speed. > > > > > > Does kernel has any standard utilities to test throughput on PCIe interface? > > I know some PCIe controllers devices do have performance monitors, and > perf might support some of them, but I don't know any details. At least some of the Intel Uncore drivers have boxes specific to PCIe (for instance my IVB-EP has an uncore_r2pcie PMU). I'm not aware of any endpoint drivers, but it should not be too hard to create uncore drivers for them.