* can, m_can, tcan4x5x : big jitter between the packets by sending
@ 2022-05-19 15:52 Michael Anochin
2022-05-19 16:26 ` Oliver Hartkopp
2022-05-19 20:10 ` Marc Kleine-Budde
0 siblings, 2 replies; 4+ messages in thread
From: Michael Anochin @ 2022-05-19 15:52 UTC (permalink / raw)
To: linux-can
Hello,
my application continuously sends 64 bytes CANFD packets with 1MBit/s at
the 10ms interval. I use tcan4450 on the RPI4 with 5.10.103 Kernel and
raspbian. No other significant processes load the CPU.
When I monitor the traffic with a PCAN adapter on a Windows PC, I notice
that the packets sometimes arrive with a delay of 5-9ms. But the next
following packet arrive faster as 10ms. My desired interval of 10ms is
kept at the jitter of +/- 9ms.
Running the App on only one CPU core using tasksel improve the jitter
somewhat.
Am I the only one who observes such large jitter or is the m_can
implementation at Perepherie (spi) not so fast from the throughput and
is completely normal.
Maybe I should switch to 5.17 kernel? On 5.17 there are bulk read/write
function for spi regmap.
Thanks and Best Regards,
Michael Anochin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: can, m_can, tcan4x5x : big jitter between the packets by sending
2022-05-19 15:52 can, m_can, tcan4x5x : big jitter between the packets by sending Michael Anochin
@ 2022-05-19 16:26 ` Oliver Hartkopp
[not found] ` <1259c8f0-9a2d-b28c-fad3-3b7459161a1d@photo-meter.com>
2022-05-19 20:10 ` Marc Kleine-Budde
1 sibling, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2022-05-19 16:26 UTC (permalink / raw)
To: anochin, linux-can
Hi Michael,
On 19.05.22 17:52, Michael Anochin wrote:
> my application continuously sends 64 bytes CANFD packets with 1MBit/s at
> the 10ms interval.
How does this application implement this 10ms interval?
Can you check whether
cangen -g 10 -f -I 123 -L 64 can0
has the same problems?
With
candump -td can0
you should be able to see some timestamp gaps around 10ms.
> I use tcan4450 on the RPI4 with 5.10.103 Kernel and
> raspbian. No other significant processes load the CPU.
>
> When I monitor the traffic with a PCAN adapter on a Windows PC, I notice
> that the packets sometimes arrive with a delay of 5-9ms. But the next
> following packet arrive faster as 10ms. My desired interval of 10ms is
> kept at the jitter of +/- 9ms.
>
> Running the App on only one CPU core using tasksel improve the jitter
> somewhat.
What is the use-case for this 10ms cyclic transmission? Maybe the
CAN_BCM (which uses in-kernel highres timers) could bring an improvement
for you.
> Am I the only one who observes such large jitter or is the m_can
> implementation at Perepherie (spi) not so fast from the throughput and
> is completely normal.
>
> Maybe I should switch to 5.17 kernel? On 5.17 there are bulk read/write
> function for spi regmap.
I don't answer to this as I don't have the required SPI knowledge ...
but if you could upgrade to a newer kernel this is always a good
approach ;-)
Best regards,
Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: can, m_can, tcan4x5x : big jitter between the packets by sending
2022-05-19 15:52 can, m_can, tcan4x5x : big jitter between the packets by sending Michael Anochin
2022-05-19 16:26 ` Oliver Hartkopp
@ 2022-05-19 20:10 ` Marc Kleine-Budde
1 sibling, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2022-05-19 20:10 UTC (permalink / raw)
To: Michael Anochin; +Cc: linux-can
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
On 19.05.2022 17:52:36, Michael Anochin wrote:
> my application continuously sends 64 bytes CANFD packets with 1MBit/s at the
> 10ms interval. I use tcan4450 on the RPI4 with 5.10.103 Kernel and raspbian.
> No other significant processes load the CPU.
>
> When I monitor the traffic with a PCAN adapter on a Windows PC, I notice
> that the packets sometimes arrive with a delay of 5-9ms. But the next
> following packet arrive faster as 10ms. My desired interval of 10ms is kept
> at the jitter of +/- 9ms.
>
> Running the App on only one CPU core using tasksel improve the jitter
> somewhat.
>
> Am I the only one who observes such large jitter or is the m_can
> implementation at Perepherie (spi) not so fast from the throughput and is
> completely normal.
>
> Maybe I should switch to 5.17 kernel? On 5.17 there are bulk read/write
> function for spi regmap.
The tcan4x5x driver is not really optimized. Don't expect great
performance with it. At least the newer kernel have some kind of
optimization. There are a lot of further optimization opportunities
which are already implemented in the mcp251xfd driver.
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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-19 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 15:52 can, m_can, tcan4x5x : big jitter between the packets by sending Michael Anochin
2022-05-19 16:26 ` Oliver Hartkopp
[not found] ` <1259c8f0-9a2d-b28c-fad3-3b7459161a1d@photo-meter.com>
2022-05-19 18:50 ` Oliver Hartkopp
2022-05-19 20:10 ` Marc Kleine-Budde
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).