Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
86duino SDK for linux issue - high load
2020 年 02 月 26 日
17:53:50
pongraczi
Hungary
Moderator
Forum Posts: 22
Member Since:
2015 年 02 月 11 日
Offline

Hi,
I use linux on all 86duino boards and I am facing an issue and I have no answer/solution for this.

Summary
When I write a simple program using 86duino sdk under linux and upload to the 86duino, the program can run and do tasks, but the system load jumps to 1.0 and more.
Checking the tasks list (htop), I can see two processes running as the application and both of them are 99-100% load.
I guess, when the 86duino board working only as a 86duino/arduino board (not using linux and 86duino sdk on it but the 86duino and its native code) it is ok, all resources for the only program runs on it, but in linux this situation is not good.

The problem
Due to that, I want to use linux and other programs on it in parallel by the 86duino program (like as simple as read some digital/analog values, nothing special really), the response of the system getting very bad, even logging in via ssh takes long time etc,
It is not really a good situation when all cpu resources goes to the 86duino code, even it has delay/or sleep with 1 sec to read/write digital io in every seconds, the high load still exists, both processes takes 100% of cpu.

The question
Is there any way to solve this issue or this is by design?

Thanks,
István

2020 年 03 月 02 日
00:11:32
pongraczi
Hungary
Moderator
Forum Posts: 22
Member Since:
2015 年 02 月 11 日
Offline

Hi,

I found the reason of the high load of the executable.
It is by design and not a bug.

The situation is that, handling external interrupts needs a 2nd thread which continuously running and check installed interrupts to invoke if necessary.

WInterrupts.h contains the thread: void *intrMain(void*pargs) function, which will run and call callbacks if necessary.
It seems when the user do not need external interrupts, it safe to disable interrupt_init in 86Duino_Init.cpp and recompile the whole library with make.

Only modification necessary to achieve it:
File: 86Duino_Linux_SDK/cores/86Duino_Init.cpp
Line 6 should be commented out (diff like syntax):
- interrupt_init();
+ // interrupt_init();

Any hint about sideffect from developers?

Thanks,
István

Forum Timezone: Asia/Taipei

Most Users Ever Online: 66

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

Ekkehard: 8

lukeross: 8

hippy: 8

smeezekitty: 8

UIdahoCIT: 8

tomka: 8

zealot02: 7

Member Stats:

Guest Posters: 0

Members: 1549

Moderators: 14

Admins: 5

Forum Stats:

Groups: 2

Forums: 10

Topics: 242

Posts: 1089

Newest Members: gp02a1, neveningblack, hrvoje, TNYY, VerlaHiltz, iamzero, Stevo99, Daveydave, nhollywoodmarli, bat869cube672

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 213, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 22, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 0