linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bryan O'Donoghue <pure.logic@nexus-software.ie>,
	Peter Hurley <peter@hurleysoftware.com>,
	linux-serial@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>,
	linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	ismo.puustinen@intel.com,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH v5 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark
Date: Tue, 24 May 2016 21:08:21 +0300	[thread overview]
Message-ID: <1464113301.31269.79.camel@linux.intel.com> (raw)
In-Reply-To: <1464111448.31269.67.camel@linux.intel.com>

On Tue, 2016-05-24 at 20:37 +0300, Andy Shevchenko wrote:
> On Thu, 2016-05-19 at 02:18 +0100, Bryan O'Donoghue wrote:
> > On Thu, 2016-05-12 at 18:06 +0300, Andy Shevchenko wrote:
> > > On Fri, 2016-05-06 at 18:17 +0300, Andy Shevchenko wrote:
> > > > This is combined series of two things:
> > > > - split out the Intel LPSS specific driver from 8250_pci into
> > > > 8250_lpss
> > > > - enable DMA support on Intel Quark UART
> > > > 
> > > > The patch has been tested on few Intel SoCs / platforms. In any
> > > > case I
> > > > would
> > > > like to ask Bryan to do independent test.
> > 
> > Andy.
> > 
> > It looks as though there's a performance drop when enabling the DMA
> > here (v) stock PIO mode with the 8250 driver.

Wait, the time measurement you done is unrelated to DMA/non-DMA mode.
It's significantly depend to the speed of the port.

It would be better to have 1000(s) of iterations to see any steady
difference out of statistical error. Below result doesn't show anything
like this.

I also tried on my Galileo board, I used longer data stream, i.e. output
of dmesg (since your data pattern makes 0:s in statistics) and got
something quite near to each other:

###
Size of the data (it actually become few dozens of bytes (55 bytes to be
precise) bigger since one message had been printed in the second part of
high speed test
###

% dmesg | wc -c
34965

### Low speed, DMA mode enabled by default ###
% stty -F /dev/ttyS0 9600

% time dmesg > /dev/ttyS0
real    0m 34.22s
user    0m 0.01s
sys     0m 0.02s

NOTE: Transfer speed: 34965b/34.22s ~= 1021.77b/s (9600 baud)

### non-DMA mode ###
% echo 3 > /sys/class/tty/ttyS0/dma_mode 

% time dmesg > /dev/ttyS0
real    0m 36.09s
user    0m 0.01s
sys     0m 0.02s

### Higher speed ###

% stty -F /dev/ttyS0 921600

% time dmesg > /dev/ttyS0
real    0m 0.41s
user    0m 0.01s
sys     0m 0.03s

NOTE: Transfer speed: 34965b/0.41s ~= 85280.49b/s (921600 baud)

### DMA mode enabled ###
% echo 0 > /sys/class/tty/ttyS0/dma_mode 

% time dmesg > /dev/ttyS0
real    0m 0.41s
user    0m 0.01s
sys     0m 0.02s

> 
> Below results doesn't show DMA case (by the way, how did you disable
> DMA
> in 3.8.7?) for stock kernel.
> 
> Anyway, I added preliminary support to change DMA mode run-time. Check
> my today topic/dw/qrk branch. It would be nice to see all 4 cases: DMA
> vs non-DMA on stock kernel (Yocto) and mine.
> 
> P.S. What is the point to test arbitrary tip branch?
> 
> > 
> > Test setup Galileo Gen1 transmitter - Galileo Gen2 receiver. TX/RX
> > cross-wired between the Arduino UART headers respectively (pins 0 &
> > 1
> > on the "Digital PWM" header), GND pin14 similarly cross-wired.
> > 
> > User-space:
> >     Receiver: Stock on-flash yocto-tiny kernel 3.8.7
> >     Transmitter: Galileo Debian image :
> >                  https://sourceforge.net/projects/galileodebian/
> >     3.8.7 kernel: On SPI-flash BSP kernel
> >     andy-v4: From your tree
> >              d13ffcf ('serial: 8250: attempt to keep Kconfig and
> >                        Makefile in order')
> >     tip-of-tree : 97f0090 ('Merge tag 'rproc-v4.7' of
> >                             git://github.com/andersson/remoteproc')
> > 
> > Results:
> > 
> > ### Test0 ###
> > 
> > galileo dma andy-v4 9600 8n1 
> > 
> > root@galileo:~# time echo "abcdefghijklmnopqrstuvwxyz0123456789" >
> > /dev/ttyS0
> > 
> > real    0m0.060s
> > user    0m0.000s
> > sys     0m0.000s
> > 
> > 
> > galileo non-dma Linux 3.8.7 9600 8n1:
> > 
> > 9600 8n1
> > root@galileo:~# time echo "abcdefghijklmnopqrstuvwxyz0123456789" >
> > /dev/ttyS0
> > 
> > real    0m0.051s
> > user    0m0.000s
> > sys     0m0.000s
> > 
> > galileo non-dma tip-of-tree 9600 8n1:
> > 
> > root@galileo:~# time echo "abcdefghijklmnopqrstuvwxyz0123456789" >
> > /dev/ttyS0
> > 
> > real    0m0.048s
> > user    0m0.000s
> > sys     0m0.000s
> > 
> > 
> > ### Test1 ###
> > 
> > galileo dma andy-v4 9600 8n1:
> > 
> > root@galileo:~# time echo
> > "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz01234
> > 56
> > 7
> > 89abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123
> > 45
> > 6
> > 789abcdefghijklmnopqrstuvwxyz0123456789" > /dev/ttyS0
> > 
> > real    0m0.209s
> > user    0m0.000s
> > sys     0m0.000s
> > 
> > galileo non-dma Linux 3.8.7 9600 8n1:
> > 
> > root@galileo:~# time echo
> > "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz01234
> > 56
> > 7
> > 89abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123
> > 45
> > 6
> > 789abcdefghijklmnopqrstuvwxyz0123456789" > /dev/ttyS0
> > 
> > real    0m0.206s
> > user    0m0.000s
> > sys     0m0.000s
> > 
> > 
> > galileo non-dma tip-of-tree 9600 8n1:
> > 
> > root@galileo:~# time echo
> > "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz01234
> > 56
> > 7
> > 89abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123
> > 45
> > 6
> > 789abcdefghijklmnopqrstuvwxyz0123456789" > /dev/ttyS0
> > 
> > real    0m0.199s
> > user    0m0.010s
> > sys     0m0.000s



-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2016-05-24 18:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 15:17 [PATCH v5 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 01/11] dmaengine: dw: keep copy of custom slave config in dwc Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 02/11] dmaengine: dw: provide probe(), remove() stubs for users Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 03/11] dmaengine: dw: set polarity of handshake interface Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 04/11] dmaengine: dw: override LLP support if asked in platform data Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 05/11] serial: 8250_dma: switch to new dmaengine_terminate_* API Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 06/11] serial: 8250_dma: adjust DMA address of the UART Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 07/11] serial: 8250: enable AFE on ports where FIFO is 16 bytes Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 08/11] serial: 8250_lpss: split LPSS driver to separate module Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 09/11] serial: 8250_lpss: move Quark code from PCI driver Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 10/11] serial: 8250_lpss: enable MSI for Intel Quark Andy Shevchenko
2016-05-06 15:17 ` [PATCH v5 11/11] serial: 8250_lpss: enable DMA on Intel Quark UART Andy Shevchenko
2016-05-12 15:06 ` [PATCH v5 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Andy Shevchenko
2016-05-12 15:59   ` Vinod Koul
2016-05-19  1:18   ` Bryan O'Donoghue
2016-05-24 17:37     ` Andy Shevchenko
2016-05-24 18:08       ` Andy Shevchenko [this message]
2016-05-26 16:36         ` Bryan O'Donoghue
2016-06-07 10:04           ` Andy Shevchenko
2016-06-12 17:13             ` Bryan O'Donoghue
2016-06-13 11:16               ` Andy Shevchenko
2016-05-26 16:11       ` Bryan O'Donoghue

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=1464113301.31269.79.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=ismo.puustinen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=pure.logic@nexus-software.ie \
    --cc=vinod.koul@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).