Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

CPU overload when reading UDP packets in NIOS1

Hi fellows

My application periodically in a loop (with period 20ms) receives about 200byte long UDP packets and normally the CPU load (computed from /proc/stat info...) remains around 1 or 2%. But when another demanding app. is started concurently with my app., then the CPU load sometimes raises to 100% ! Even more, when the priority of my app. is driven to realtime SCHED_FIFO type, then the app. halts another processes until it is killed or no packets are incoming from outside.

I tried variety of functions - blocked read(), select() function, real-time signals (SIGIO), also tried to switch on kernel preemtion support, but nothing changed..

Even with simple blocked read() I got the same results - incredibly high CPU load. I think the problem is hidden somewhere in the kernel (maybe in process scheduler).

I will be very pleased, if you give me some hints and suggestions about kernel or about my application, to get low and stable CPU load.

----

I use:

Altera cyclone board, original LDK with NIOS1, uClinux environment for NIOS1 and kernel boots from FLASH, where the ROMDISK filesystem resides..

---

thanks, jan
No RepliesBe the first to reply