Hi
Thanks for trying to help solving issue.
Looks like something has changed, perhaps in RFS from my last LinuxLink builds. Previously CPU usage was high like 30% with no CAN app running (kernel only). Starting CAN app (kernel+app) CPU usage was rising to 60% or more depending on message rate. Now with no CAN app running, I see no CPU load, but starting CAN app I see the same 60% for kernel+app. I see high CPU loads only using FlexCAN driver. Using external USB-CAN dongle I see no load, just a couple of % for kernel+app and much higher message rates.
I'll try reproducing issue in new smaller application, also try to figure what's changed that kernel god better and seems not loading alone CPU.
Update1: See attached trycan project. It just waits for can messages using select() and displays message rate. The same problem, high CPU load.
Update2: Well. Finally I found what caused high CPU load with ~6kmsgs/s when CAN app is not running. It was a missing gpio-keys status="disabled" is dts file. (See attached *.dts) Now CPU load is around zero with lots of messages and CAN app (trycan) not running. But question remains, why I see high CPU load when CAN application is running.
Again, what I have.
- untouched kernel image from last LinuxLink build, modified *.dts file as attached.
- ~5800 messages / sec on CAN bus.
- trycan running
- CPU load 40-44%
- htop output:
5871 msgs/s******** 44.1%] Tasks: 8, 0 thr; 2 running
Mem[***** 9/120MB] Load average: 0.37 0.33 0.21
Swp[#* 0/0MB] Uptime: 00:14:47
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
1178 root 20 0 3016 828 724 S 41.7 0.7 0:11.72 /home/trycan
1179 root 20 0 2884 1180 980 R 1.6 1.0 0:00.80 htop
1 root 20 0 2276 692 620 S 0.0 0.6 0:00.69 init
1092 root 20 0 2276 448 392 S 0.0 0.4 0:00.00 syslogd
1135 root 20 0 1748 472 396 S 0.0 0.4 0:00.12 /usr/sbin/ifplugd
1151 root 20 0 2228 440 348 S 0.0 0.4 0:00.00 /usr/sbin/dropbea
1159 nobody 20 0 2072 404 268 S 0.0 0.3 0:00.00 /usr/sbin/boa
1167 root 20 0 2280 744 668 S 0.0 0.6 0:00.04 -/bin/sh
Am I doing something silly in my trycan? If so, then why don't I see high CPU load using USB-CAN dongle?
Regards
Edward