All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Thomas.Kopp@microchip.com
Cc: linux-can@vger.kernel.org, kernel@pengutronix.de,
	manivannan.sadhasivam@linaro.org
Subject: Re: can-next 2022-03-13: mcp251xfd: add
Date: Wed, 23 Mar 2022 15:03:47 +0100	[thread overview]
Message-ID: <20220323140347.hkuklvkefvb4l6l5@pengutronix.de> (raw)
In-Reply-To: <DM4PR11MB539016D37DC0A025799B809BFB189@DM4PR11MB5390.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]

On 23.03.2022 13:28:20, Thomas.Kopp@microchip.com wrote:
> > this series for the mcp251xfd adds IRQ coalescing support.
>
> Thanks for these patches, the performance gains with activated
> coalescing look awesome!

\o/

> Testing on a Pi4 mostly 1 channel RX-only Full busload scenarios I see
> significantly reduced CPU utilization. This is both for CAN 2.0 and
> CAN-FD use-cases.

\o/

> I tested this patch series against 5.17 mainline

Thanks for testing.
Does the coalescing series apply to v5.17 without the other series?

> and I think the performance when NOT using coalescing regressed
> slightly ("measured" via sar -u 1, not sure if that is a valid
> benchmark?)

"sar" don't know that tool, which Debian package do I have to install?

> I had both driver versions configured for the same fifo sizes and
> coalescing turned off. The mainline driver actually generates slighty
> more SPI interrupts in this scenario (20k CAN 2.0 Frames RXed in
> CAN-FD mode). Not really sure what causes the higher CPU utilization
> or if it's even relevant (maybe on smaller systems than a Pi4)

I don't know the length of the SPI transfers, where the raspi SPI driver
switched from PIO to IRQ mode. If more CAN frames are read in one
transfer (this can happen with deactivated IRQ coalescing, too) the
transfer size might be big enough to trigger an IRQ transfer, especially
in CAN-FD mode.

For better reproducibility I set the scaling_governor to performance:

| echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

I've no idea why an unpachted v5.17 generates more SPI IRQs.

Can you re-test with performance mode activated, I'm not sure when I
find time to look into this.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2022-03-23 14:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-13  8:36 can-next 2022-03-13: mcp251xfd: add Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 01/12] can: mcp251xfd: mcp251xfd_ring_init(): use %d to print free RAM Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 02/12] can: mcp251xfd: ram: add helper function for runtime ring size calculation Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 03/12] can: mcp251xfd: ram: coalescing support Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 04/12] can: mcp251xfd: ethtool: add support Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 05/12] can: mcp251xfd: ring: prepare support for runtime configurable RX/TX ring parameters Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 06/12] can: mcp251xfd: update macros describing ring, FIFO and RAM layout Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 07/12] can: mcp251xfd: ring: add support for runtime configurable RX/TX ring parameters Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 08/12] can: mcp251xfd: add RX IRQ coalescing support Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 09/12] can: mcp251xfd: add RX IRQ coalescing ethtool support Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 10/12] can: mcp251xfd: add TX IRQ coalesce support Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 11/12] can: mcp251xfd: add TX IRQ coalesce ethtool support Marc Kleine-Budde
2022-03-13  8:36 ` [can-next-rfc 12/12] can: mcp251xfd: ring: increase number of RX-FIFOs to 3 and increase max TX-FIFO depth to 16 Marc Kleine-Budde
2022-03-23 13:28 ` can-next 2022-03-13: mcp251xfd: add Thomas.Kopp
2022-03-23 14:03   ` Marc Kleine-Budde [this message]
2022-03-23 15:00     ` Thomas.Kopp
2022-03-23 19:28       ` Marc Kleine-Budde
2022-03-24 12:28         ` Thomas.Kopp
2022-03-24 13:45           ` can-next 2022-03-13: mcp251xfd: add coalescing support Marc Kleine-Budde
2022-03-29  9:08 ` can-next 2022-03-13: mcp251xfd: add Thomas.Kopp

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=20220323140347.hkuklvkefvb4l6l5@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Thomas.Kopp@microchip.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.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.