Reputation: 1492
I'm writing a system which process network packets on SMP (centos 6.4). I'm using cpu isolation and running a single ktrhead on some of the cores, if I don't release the cpu once on a while by calling schedule() the system get watch dog, I've tried to move to real time priority and release the cpu for specific amount of time, for example 50 jiffies every 450 jiffes, but it get stuck. my question, is jiffies updated by softirq kthread? preventing from jiffies to increment if I don't release the cpu?
Thanks
Upvotes: 0
Views: 1078
Reputation: 986
jiffies is incremented when timer interrupt is hit. Timer interrupt is hit by system timer. It is not updated by softirq kthread.
In x86, system timer is implemented via programmable interrupt timer (PIT). PPC implements it via decrementer.
From the description of your thread, it seems your thread is locking up the cpu, hence watchdog hit is expected based on its timeout. In most systems, jiffies is 10ms; however you can check its value by checking value of HZ: HZ value will give number of timer interrupts in a second, hence there are HZ jiffies in a second.
In your case, whenever you release the CPU, watchdog thread gets a chance to run and check the current jiffies and then it compares with the jiffies value stored when it was last run: if it finds the difference greater than or equal to watchdog timeout, it hits and resets the system if configured.
Upvotes: 1