From: Wolfgang Grandegger <wg@grandegger.com>
To: Mirza Krak <mirza.krak@hostmobility.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Dual SJA1000 can controllers on SMP system.
Date: Sun, 16 Jun 2013 11:20:05 +0200 [thread overview]
Message-ID: <51BD8345.8090808@grandegger.com> (raw)
In-Reply-To: <51B9BF61.8050905@hostmobility.com>
On 06/13/2013 02:47 PM, Mirza Krak wrote:
> Dear Sirs.
>
> I am running a 3.1.10 kernel on Nvidia Tegra 2 CPU (Dual Core). Not
> vanilla kernel (Linux4Tegra).
>
> We are using dual can controllers connected on th external data bus on
> our custom hardware. The can controllers are SJA1000.
What external data bus is the CAN controller connected to?
And which CAN controller board/card?
> Driver that is used is vanilla sja1000 driver (sja1000.c)
Which bus driver is used and how do you load the module?
> Now to the issue at hand. Will try my best to explain our scenario and
> issue:
> 1. The two can controllers are connected with each other with a
> loop-back.
> 2. What we are attempting is to send data on both controllers in two
> separate processes. We are using following command "cansequence can0 -p
> &" and "cansequence can1 -p &". With a bit-rate configured to 1 Mbit/s.
> 3. What we see when we attempt the above is that one of the
> controllers stop sending and the software buffer gets filled up. When it
> stops varies but usually after a few packets are sent.
>
> After some digging we came to this conclusion. The two cansequence
> processes end up on different CPU cores. The process that ends up in
> CPU1 is the one that always stops transmitting.
>
> Workarounds that we have seen that works is
> 1. Disable dual core with kernel argument "maxcpus=1".
> 2. Forcing the cansequence processes to CPU0 with "taskset" command.
>
> My question to you is if anyone has tested the SJA1000 driver on an SMP
> system or anything similar.
Well, sending from two processes concurrently is not really a typical
use case. ftrace is your friend. A function trace may help to find the
root of the problem. Let me know if you need further help on that.
Wolfgang.
next prev parent reply other threads:[~2013-06-16 9:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 12:47 Dual SJA1000 can controllers on SMP system Mirza Krak
2013-06-16 9:20 ` Wolfgang Grandegger [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-16 11:20 mirza
2013-06-16 12:39 ` Wolfgang Grandegger
2013-06-17 6:10 ` Mirza Krak
2013-06-17 7:18 ` Marc Kleine-Budde
2013-06-17 13:46 ` Mirza Krak
2013-06-17 14:12 ` Marc Kleine-Budde
2013-06-17 18:49 ` Mirza Krak
2013-06-17 19:34 ` Wolfgang Grandegger
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=51BD8345.8090808@grandegger.com \
--to=wg@grandegger.com \
--cc=linux-can@vger.kernel.org \
--cc=mirza.krak@hostmobility.com \
/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.