From: Tom Evans <tom_usenet@optusnet.com.au>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Stephane Grosjean <s.grosjean@peak-system.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Manfred Schlaegl <manfred.schlaegl@gmx.at>
Subject: Re: [BULK]Re: [PATCH] can: fix loss of frames due to wrong assumption in raw_rcv
Date: Mon, 06 Jul 2015 16:50:04 +1000 [thread overview]
Message-ID: <559A251C.8030307@optusnet.com.au> (raw)
In-Reply-To: <559A15D6.2010704@hartkopp.net>
On 06/07/15 15:44, Oliver Hartkopp wrote:
> /me again
>
> On 05.07.2015 20:21, Oliver Hartkopp wrote:
>
>> With
>>
>> # echo 1 > /proc/irq/28/smp_affinity
>> ..
>> and all the out-of-order receptions were totally gone! \o/
>>
>
> I ran the test for 11 hours now (3 x 8000 = 24.000 frames/s).
>
> No single out-of-order frame this time - not even with the PCAN-USB.
I don't think you can force a specific "CPU Affinity Requirement" on this driver.
CPU Affinity may fix this problem, but I suspect there should be a more
"standard" fix. This sort of problem (multiple CPUs fielding interrupts and
getting them out of order) should show up elsewhere. It might even swap bytes
from a UART.
There must be a "standard synchronization technique" of some sort that
provides the proper sequencing here. Can anyone else reading this thread who
knows if this is right please chime in?
Google finds:
http://www.alexonlinux.com/why-interrupt-affinity-with-multiple-cores-is-not-such-a-good-thing
Moreover, assuming TCP connection object is properly
protected using synchronization techniques, one of
the cores will inevitably have to wait for the other,
adding unnecessary delay to packet processing.
It seems to me that the "CAN connection object" is not "properly protected" in
the existing driver. That CAN driver may not have had the "SMP Magic Wand"
waved over it.
Tom
next prev parent reply other threads:[~2015-07-06 6:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-20 17:21 [PATCH] can: fix loss of frames due to wrong assumption in raw_rcv Manfred Schlaegl
2015-06-20 22:42 ` Oliver Hartkopp
2015-06-20 22:42 ` Oliver Hartkopp
2015-06-22 9:48 ` Manfred Schlaegl
2015-06-22 9:48 ` Manfred Schlaegl
2015-06-22 10:24 ` Oliver Hartkopp
2015-06-22 10:24 ` Oliver Hartkopp
[not found] ` <5588E6FB.5040903@optusnet.com.au>
2015-06-23 8:01 ` Oliver Hartkopp
2015-06-24 2:13 ` Tom Evans
2015-06-24 19:56 ` Oliver Hartkopp
2015-06-25 8:32 ` [BULK]Re: " Stephane Grosjean
2015-06-25 9:36 ` Oliver Hartkopp
2015-06-29 16:13 ` Oliver Hartkopp
2015-07-04 16:54 ` Oliver Hartkopp
2015-07-05 1:18 ` Tom Evans
2015-07-05 18:21 ` Oliver Hartkopp
2015-07-06 5:44 ` Oliver Hartkopp
2015-07-06 6:50 ` Tom Evans [this message]
2015-07-06 17:09 ` Oliver Hartkopp
2015-07-06 7:58 ` [BULK]Re: " Stephane Grosjean
2015-07-06 17:14 ` Oliver Hartkopp
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=559A251C.8030307@optusnet.com.au \
--to=tom_usenet@optusnet.com.au \
--cc=linux-can@vger.kernel.org \
--cc=manfred.schlaegl@gmx.at \
--cc=mkl@pengutronix.de \
--cc=s.grosjean@peak-system.com \
--cc=socketcan@hartkopp.net \
/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.