Page 1 of 1

Kernel Resolution/HZ

Posted: Fri Apr 15, 2016 12:14 pm
by shm0
Hi!

are the kernels compiled with 1000hz resolution?
Are there differences across platforms?
I need to know this for mvebu platform.

Thank you.

Re: Kernel Resolution/HZ

Posted: Fri Apr 15, 2016 3:23 pm
by tapper
Hi what do you mean by 1000 HZ?

Re: Kernel Resolution/HZ

Posted: Fri Apr 15, 2016 5:12 pm
by shm0
The tick rate has a frequency of HZ hertz and a period of 1/HZ seconds. For example, in include/asm-i386/param.h, the i386 architecture defines:

#define HZ 1000 /* internal kernel time frequency */

Therefore, the timer interrupt on i386 has a frequency of 1000HZ and occurs 1,000 times per second (every one-thousandth of a second, which is every millisecond). Most other architectures have a tick rate of 100. Table 10.1 is a complete listing of the supported architectures and their defined tick rates.
Increasing the tick rate means the timer interrupt runs more frequently. Consequently, the work it performs occurs more often. This has the following benefits:

The timer interrupt has a higher resolution and, consequently, all timed events have a higher resolution

The accuracy of timed events improves
You can define the kernel tick rate when you build the kernel in the .config.
The default is 250hz i think. So you get a tick every 4ms. When changed to 1000hz you get a tick every 1ms.

Im asking because of the hfsc paper states that a kernel with higher resolution/tick rate is preferred.

Re: Kernel Resolution/HZ

Posted: Fri Apr 15, 2016 6:15 pm
by Lantis
It won't have been changed from the openwrt default.

Re: Kernel Resolution/HZ

Posted: Sun Apr 17, 2016 8:49 am
by shm0
The default is 250hz?