On 07/04/2011 09:01 AM, Bhupesh SHARMA wrote: > Hi Wolfgang, > >> -----Original Message----- >> From: Wolfgang Grandegger [mailto:[email protected]] >> Sent: Monday, July 04, 2011 12:24 PM >> To: Bhupesh SHARMA >> Cc: Oliver Hartkopp; [email protected]; >> [email protected] >> Subject: Re: Frame Loss during RX >> >> On 07/04/2011 07:02 AM, Bhupesh SHARMA wrote: >>> Hi Oliver, >> ... >>> So, is there a mechanism to receive frames correctly using the >> 'candump' application >>> with a socketCAN driver which implements NAPI (especially on >> commercial products which >>> will expect the frames transmitted by a transmitter to be received >> correctly [read in-order] >>> by an application running on the receiver side? >> >> The receiving task does not process CAN messages quickly enough. To >> decrease latencies, you can increase the priority of that task and use >> real-time priorities. Also CONFIG_PREEPMT does usually help and if you >> need to respond even faster, CONFIG_PREEPMT_RT might be an option >> (allowing to prioritize the relevant irq and sirq threads). In case you >> are more curious, the long latencies could be traced with ftrace. >> > > I am wondering if transferring my CAN interrupt line from normal INT to fast > INT will make a difference? Anyway I will try CONFIG_PREEPMT (and its RT > variant) > and get back with the results.
It's a matter of process scheduling. The driver is reading the messages fast enough. First try if "chrt -p 10 -f <pid>" helps. Wolfgang. _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
