Oliver Hartkopp wrote:
> Wolfgang Grandegger wrote:
>> Oliver Hartkopp wrote:
>>> Marc Kleine-Budde wrote:
>>>
>>>> let's look the the cangen source if there's propper error handling...
>>>> http://svn.berlios.de/viewvc/socketcan/trunk/can-utils/cangen.c?revision=787&view=markup
>>>> nope, there isn't
>>>>
>>>> There's the option "-i" to ignore ENOBUFS, which is....we don't want to
>>>> do that....
>>>>
>>> I added a new "-p <timeout>" option to the cangen tool in the SocketCAN SVN.
>>>
>>> Thanks for the suggestion!
>>>
>>> Just fyi there's no significant difference in CPU usage or CAN bus load with
>> Hm, that does surprise me. At what bitrate are you testing?
>>
> 
> I was testing @500kBit/s with an EMS PCMCIA Card connected directly to a PEAK
> USB Adapter (with termination).
> 
> Using
> 
>    cangen can0 -g0 -i -x
> 
> the generated busload was ca. 1-2% higher and the Gnome CPU systemmonitor
> indicated a slightly lower CPU usage than with
> 
>    cangen can0 -g0 -p 1 -x
> 
> You may try this on our own. So even when the "ignore enobufs" approach looks
> a bit silly, it has a (positive) difference to the poll implementation.
> 
> No idea why it is like this ...

Just did some test at 125 Kb/s on my MPC5200 and can confirm your
results: almost 100% CPU usage in both cases. poll() seems not to block.

Wolfgang.
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to