All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
To: Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>,
	Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Noralf Tronnes <noralf-L59+Z2yzLopAfugRpC6u6w@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mathias Duckeck
	<m.duckeck-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Frank Pavlic <f.pavlic-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org>
Subject: Re: [PATCH 0/7] Raspberry Pi spi0 improvements
Date: Thu, 15 Nov 2018 21:11:01 -0800	[thread overview]
Message-ID: <87r2flli8q.fsf@anholt.net> (raw)
In-Reply-To: <20181114055121.5xpwxcu6a5qsgjqv-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1850 bytes --]

Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> writes:

> On Tue, Nov 13, 2018 at 09:12:01PM -0800, Florian Fainelli wrote:
>> On 11/7/2018 11:06 PM, Lukas Wunner wrote:
>> > Here's a first batch of improvements for the spi0 master on the
>> > Raspberry Pi.  The meat of the series is in its last two patches:
>> > 
>> > * Patch [6/7] allows DMA for transfer buffers starting at an offset not a
>> >   multiple of 4.  This overcomes a limitation affecting Ethernet drivers
>> >   such as ks8851 which call netdev_alloc_skb_ip_align() to allocate
>> >   deliberately unaligned receive buffers.
>> > 
>> > * Patch [7/7] speeds up PIO transfers by not polling the RX FIFO when it
>> >   is known to contain data, or the TX FIFO when it is known to have free
>> >   space.
>> 
>> Do you have some performance numbers that you could share before/after,
>> e.g: transfer latencies, number of interrupts and pure throughput?
>
> The throughput is primarily determined by the serial clock configured in
> the DT for a specific SPI slave.  There's nothing we can improve there
> in software.
>
> This series is about reducing CPU usage.  E.g. without patch [6/7],
> transfer buffers not aligned to 32-bit are transmitted with programmed I/O
> instead of DMA.  Thus, constantly receiving packets on a ks8851 Ethernet
> chip with a serial clock of 20 MHz occupies 25% of a CPU on a RasPi 3
> (for the ks8851 IRQ thread).  With the patch, it drops to a negligible
> percentage.  The spi-bcm2835.c driver currently forces PIO even for
> kmalloc'ed buffers which are always contiguous in physical memory,
> i.e. for no reason at all.

With the whole series, I got an improvement in kmscube on my hx8357d spi
panel and vc4 rendering from 5.9fps to 6.6fps.  No stats, but the
numbers seem fairly stable between runs.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 206 bytes --]

_______________________________________________
linux-rpi-kernel mailing list
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

      parent reply	other threads:[~2018-11-16  5:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08  7:06 [PATCH 0/7] Raspberry Pi spi0 improvements Lukas Wunner
     [not found] ` <cover.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-08  7:06   ` [PATCH 2/7] spi: bcm2835: Fix book-keeping of DMA termination Lukas Wunner
2018-11-08  7:06   ` [PATCH 7/7] spi: bcm2835: Speed up FIFO access if fill level is known Lukas Wunner
     [not found]     ` <901ff28c305e56d3349d3e044781c095d8e77a3d.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-10 10:03       ` kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found]         ` <807EBC97-54BD-49D5-86C8-3768FB4C0105-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2018-11-10 11:25           ` Stefan Wahren
     [not found]             ` <20181113080740.lrhfo656m7e4kb7a@wunner.de>
     [not found]               ` <20181113080740.lrhfo656m7e4kb7a-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-13 19:07                 ` Stefan Wahren
     [not found]                   ` <230536172.259102.1542136037433-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2018-11-14  5:14                     ` Florian Fainelli
     [not found]             ` <52205641.172367.1541849134970-uEpKuDZ350hmhno068Nerg@public.gmane.org>
2018-11-28 15:58               ` Mark Brown
2018-11-08  7:06   ` [PATCH 3/7] spi: bcm2835: Fix race on DMA termination Lukas Wunner
2018-11-08  7:06   ` [PATCH 1/7] spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode Lukas Wunner
2018-11-08  7:06   ` [PATCH 6/7] spi: bcm2835: Overcome sglist entry length limitation Lukas Wunner
     [not found]     ` <eb5ce210b06fb68580961038412f9499c3e56a76.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-09 15:43       ` Stefan Wahren
2018-11-08  7:06   ` [PATCH 4/7] spi: bcm2835: Drop unused code for native Chip Select Lukas Wunner
     [not found]     ` <a24869503ed4e867b11c66c8615a4d5cddb3b2b5.1541659680.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-10  9:07       ` kernel-TqfNSX0MhmxHKSADF0wUEw
2018-11-08  7:06   ` [PATCH 5/7] spi: bcm2835: Document struct bcm2835_spi Lukas Wunner
2018-11-10  9:13   ` [PATCH 0/7] Raspberry Pi spi0 improvements kernel-TqfNSX0MhmxHKSADF0wUEw
2018-11-14  5:12   ` Florian Fainelli
     [not found]     ` <20181114055121.5xpwxcu6a5qsgjqv@wunner.de>
     [not found]       ` <20181114055121.5xpwxcu6a5qsgjqv-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-11-16  5:11         ` Eric Anholt [this message]

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=87r2flli8q.fsf@anholt.net \
    --to=eric-whkq6xtqapystnjn9+bgxg@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=f.pavlic-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
    --cc=m.duckeck-XB/JSsFECOqzQB+pC5nmwQ@public.gmane.org \
    --cc=noralf-L59+Z2yzLopAfugRpC6u6w@public.gmane.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.