linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Aiken, Scott" <Scott.Aiken@karlstorz.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: real-time transmission?
Date: Tue, 03 Sep 2013 16:59:51 +0200	[thread overview]
Message-ID: <5225F967.9060106@pengutronix.de> (raw)
In-Reply-To: <5225F8A5.4060207@pengutronix.de>

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

On 09/03/2013 04:56 PM, Marc Kleine-Budde wrote:
>> I’m porting an old implementation of CAL/CiA to Linux.  The device
>> connection protocol has some pretty tight timing.  I’ve observed that
>> some CAN packets are buffered for 500 ms between the socket write() call
>> and the actual transmission of the packet.  This is enough to sabotage
>> the connection process, and possibly take out other devices as well. 
>> Are there any socket options to disable buffering of write packets, and
>> send them when write() is called? 

Depends who introduces that big delay. If you're sending too much CAN
traffic on your system you can use traffic shaping to prioritize your
communication. It there are other interrupts in the system you may want
to use PREEMPT_RT and play with the interrupt and net-rx/tx softirq
priorities.

I think the first step should be measurements to figure out who
introduces the delay.

Regards,
Marc

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

      reply	other threads:[~2013-09-03 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11071630B606A2488DE633430B530FDE57F06BEE@ELS-EX01-PV.KSTG.corp>
2013-09-03 14:56 ` [Socketcan-users] real-time transmission? Marc Kleine-Budde
2013-09-03 14:59   ` Marc Kleine-Budde [this message]

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=5225F967.9060106@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Scott.Aiken@karlstorz.com \
    --cc=linux-can@vger.kernel.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 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).