All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ssagarr Patil <hugarsagar@outlook.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: RE: C_CAN: can frame drops
Date: Fri, 25 Jul 2014 14:05:48 +0530	[thread overview]
Message-ID: <BAY176-W40C40CD192EBD241673159D3FC0@phx.gbl> (raw)
In-Reply-To: <53D214E2.7020205@pengutronix.de>

Hi Marc,

Thanks for the response!
>
> On 07/25/2014 10:22 AM, Ssagarr Patil wrote:
>> Hi Marc,
>>
>>>
>>> On 07/25/2014 10:13 AM, Ssagarr Patil wrote:
>>>>>> I am using the c_can driver for latest kernel and using the latest canutils to dump to a file.
>>>>>> My can bus is set at a rate of 1Mb (receiving 7000fps bus load of 80%).
>>>>>>
>>>>>> When I use the candump tool to dump can frames I get following message,
>>>>>>
>>>>>> 'DROPCOUNT: dropped 2223 CAN frames on 'any' socket (total drops 1629092)'
>>>>>
>>>>> These are the CAN frames dropped by the socket, this means as Oliver
>>>>> pointed out, that the candump fails to read the CAN frames fast enough
>>>>> from the socket. How do you connect to the linux box with the c_can?
>>>>> Where are the CAN frames printed to?
>>>>>
>>>> Agreed this is dropped by the socket, so for this to solve I increased the socket size
>>>> (with -r option of candump to 111173056) after doing this I see that there is frame drop in
>>>> the driver ie I see this function c_can_handle_lost_msg_obj() being called frequently in which
>>>> can frame is overwritten.
>>>>
>>>> I have a can frame generator which I have connected to the EVM, the EVM is recieving the
>>>> frames and just dumping it on stdout going ahead I need to log the canframes to SD card.
>>>
>>> ...and where is your stdout going? serial line, telnet, ssh?
>>>
>> Its the serial line.
>
> That's not good. As printing to the serial console is quite costly.
>
Yes agreed, although I also see some frame drops pointed by ifconfig can0
when dumping it to file (with -l option of candump)
I have also used chrt to increase the priority of candump.

Any suggestion on how to still improve the performance so as there is zero frame loss ?
either on driver or application side.

Thanks,
--Sagar
 		 	   		  

  reply	other threads:[~2014-07-25  8:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 14:48 C_CAN: can frame drops Ssagarr Patil
2014-07-23 16:04 ` Oliver Hartkopp
2014-07-23 16:33   ` Ssagarr Patil
2014-07-24  7:40     ` Ssagarr Patil
2014-07-24 18:09       ` Oliver Hartkopp
2014-07-25  8:20         ` Ssagarr Patil
2014-07-25  7:17 ` Marc Kleine-Budde
2014-07-25  8:13   ` Ssagarr Patil
2014-07-25  8:16     ` Marc Kleine-Budde
2014-07-25  8:22       ` Ssagarr Patil
2014-07-25  8:27         ` Marc Kleine-Budde
2014-07-25  8:35           ` Ssagarr Patil [this message]
2014-07-25  8:48             ` Marc Kleine-Budde
2014-07-25  9:47               ` Ssagarr Patil
2014-07-25 10:10                 ` Marc Kleine-Budde
2014-07-25 11:22                   ` Ssagarr Patil
2014-07-25 10:43                 ` Oliver Hartkopp
2014-07-25 11:24                   ` Ssagarr Patil
2014-07-30 11:28                   ` Prabhakar Lad
2014-07-30 16:17                     ` Oliver Hartkopp
2014-07-31 12:41                       ` Ssagarr Patil
2014-07-31 12:42                         ` Marc Kleine-Budde
2014-07-31 14:11                           ` Oliver Hartkopp
2014-07-31 14:19                             ` Prabhakar Lad
2014-12-18  9:41                               ` [RFC] sched policies for candump Oliver Hartkopp
2014-12-18 12:33                                 ` Prabhakar Lad
2014-12-18 13:51                                   ` 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=BAY176-W40C40CD192EBD241673159D3FC0@phx.gbl \
    --to=hugarsagar@outlook.com \
    --cc=linux-can@vger.kernel.org \
    --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.