I have a very strange problem with a board based on a MIPS processor and Linux 2.6. There are NIC interrupts for all incoming Ethernet packets. If I send 10.000 packets I could see that 10.000 NIC interrupts occurred.
START SYSTEM
SEND 10k PACKETS
/mnt/system # cat /proc/interrupts
CPU0
24: 10000 MIPS NIC
29: 7192 MIPS timer
30: 0 MIPS UART1
31: 3092 MIPS serial
ERR: 0
However, after I open and close a file (filled with zeros or regular) in the filesystem, there are much fewer NIC interrupts generated. For instance, just 2-7k interrupts for 10k packets. It has a detrimental effect on the system performance, but after rebooting everything with NIC interrupts is fine again.
START SYSTEM
std::fstream f;
f.open("/mnt/system/myfile");
f.close();
WAIT FOR SOME TIME
SEND 10k PACKETS
/mnt/system # cat /proc/interrupts
CPU0
24: 2045 MIPS NIC
29: 7192 MIPS timer
30: 0 MIPS UART1
31: 3092 MIPS serial
ERR: 0
The filesystem is jffs2 and the flash drive is 32M NOR serial device. Why reading a file kills NIC interrupts until reboot?