From: David Jander <david@protonic.nl>
To: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: "Marc Kleine-Budde" <mkl@pengutronix.de>,
linux-can@vger.kernel.org,
"Martin Däumler" <martin.daeumler@systec-electronic.com>,
"Daniel Krüger" <daniel.krueger@systec-electronic.com>
Subject: Re: [PATCH v2 00/12] can: rx-offload: add implmentation and switch flexcan driver to use it
Date: Tue, 4 Oct 2016 14:33:15 +0200 [thread overview]
Message-ID: <20161004143315.23423e56@erd980> (raw)
In-Reply-To: <12311540.OPjVtcIYq6@ws-stein>
On Tue, 04 Oct 2016 13:57:33 +0200
Alexander Stein <alexander.stein@systec-electronic.com> wrote:
> Hi,
>
> On Monday 04 July 2016 20:32:05, Marc Kleine-Budde wrote:
> > this patch takes up the idea to read the CAN frames in IRQ context and send
> > them later in NAPI. The first two patches add each an offloading scheme.
> >
> > The first one is for hardware FIFO based cores, like the flexcan in FIFO
> > mode. The second one requires mailboxes with timestamps. The mailboxes are
> > read and sorted by timestamp in IRQ context, sending is done later in NAPI
> > aswell.
> >
> > The remaining patches modify the flexcan driver to make use of it. imx6 and
> > vf610 SoCs can make use of the 64 mailbox software FIFO, while older SoCs
> > still use flexcan's 6 mailbox deep hardware FIFO.
> >
> > Testing on any flexcan core is highly appreciated.
>
> We did some tests on our custom i.MX35 based board. This means we are stuck
> at the 6 mailbox deep hardware FIFO. This is how our test works:
> * Send 2 * 250000 CAN frames to the i.MX board, in 2 * 250 burst sizes at
> 1MBit/s
> * Running iperf in parallel
>
> Originally we used 3.10.95-rt102 (RT enabled) and lost CAN frames. The
> CAN-IRQ-Thread has been prioritized to SCHED_FIFO 91. Then we updated to
> 4.6.7-rt13. Without those patches in either case, RT enabled or not, the
> hardware FIFO still overran. When this patchset is applied the non-RT
> configuration successfully received all CAN frames without any drop.
> Unfortunately when RT is enabled there are still hardware overruns. A first
> try on the newly released 4.6.7-rt14 improved the situation, there are less
> overruns, but they still exist.
>
> In summary the non-RT case seems fine now, but I wonder what causes the
> delays on RT to the CAN-IRQ-Thread which seem to be about 500us (bus time of
> 6 4Byte CAN frames).
Thanks for testing!
Well, in -RT I guess anything with a higher priority than the CAN-IRQ can
cause a delay... but since going from -rt13 to -rt14 improved the situation,
this sounds like bugs in the -rt code. Are you running any code in SCHED_FIFO
that you don't run in the non-RT case?
It's nevertheless very nice to see that for non-RT, you got from losing
messages to not losing any message with this patchset, even on a lowly i.MX35
at 1Mbit/s! This proves that the patchset is certainly worth it.
Best regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2016-10-04 12:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 18:32 [PATCH v2 00/12] can: rx-offload: add implmentation and switch flexcan driver to use it Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 01/12] can: rx-offload: Add support for HW fifo based irq offloading Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 02/12] can: rx-offload: Add support for timestamp " Marc Kleine-Budde
2016-07-04 18:49 ` Andri Yngvason
2016-07-04 20:59 ` Marc Kleine-Budde
2016-07-04 22:30 ` Marc Kleine-Budde
2016-07-05 11:58 ` Andri Yngvason
2016-07-05 12:40 ` Marc Kleine-Budde
2016-07-05 5:46 ` Alexander Stein
2016-07-05 6:19 ` Marc Kleine-Budde
2016-07-05 6:31 ` David Jander
2016-07-05 7:21 ` Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 03/12] can: flexcan: remove write-only member pdata of struct flexcan_priv Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 04/12] can: flexcan: make declaration of devtype_data const Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 05/12] can: flexcan: calculate default value for imask1 during runtime Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 06/12] can: flexcan: make TX mailbox selectable " Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 07/12] can: flexcan: make use of rx-offload's irq_offload_fifo Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 08/12] can: flexcan: add missing register definitions Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 09/12] can: flexcan: activate individual RX masking and initialize reg_rximr Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 10/12] can: flexcan: add quirk FLEXCAN_QUIRK_ENABLE_EACEN_RRS Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 11/12] can: flexcan: add support for timestamp based rx-offload Marc Kleine-Budde
2016-07-04 18:32 ` [PATCH v2 12/12] can: flexcan: switch imx6 and vf610 to timestamp based offloading Marc Kleine-Budde
2016-07-13 7:28 ` [PATCH v2 00/12] can: rx-offload: add implmentation and switch flexcan driver to use it Mirza Krak
2016-07-13 7:46 ` Marc Kleine-Budde
2016-09-07 6:33 ` Holger Schurig
2016-10-04 6:32 ` Holger Schurig
2016-10-04 11:57 ` Alexander Stein
2016-10-04 12:33 ` David Jander [this message]
2016-10-05 12:37 ` Alexander Stein
2016-11-30 14:22 ` Alexander Stein
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=20161004143315.23423e56@erd980 \
--to=david@protonic.nl \
--cc=alexander.stein@systec-electronic.com \
--cc=daniel.krueger@systec-electronic.com \
--cc=linux-can@vger.kernel.org \
--cc=martin.daeumler@systec-electronic.com \
--cc=mkl@pengutronix.de \
/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.