Kernel Resolution/HZ

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
shm0
Posts: 67
Joined: Sat Sep 19, 2015 10:06 am

Kernel Resolution/HZ

Post 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.

tapper
Moderator
Posts: 1076
Joined: Sun Oct 13, 2013 5:49 pm
Location: Stoke-on-trent UK

Re: Kernel Resolution/HZ

Post by tapper »

Hi what do you mean by 1000 HZ?
Linksys WRT3200ACM
NETGEAR Nighthawk R7800
NETGEAR R6260

shm0
Posts: 67
Joined: Sat Sep 19, 2015 10:06 am

Re: Kernel Resolution/HZ

Post 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.

Lantis
Moderator
Posts: 6920
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Kernel Resolution/HZ

Post by Lantis »

It won't have been changed from the openwrt default.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

shm0
Posts: 67
Joined: Sat Sep 19, 2015 10:06 am

Re: Kernel Resolution/HZ

Post by shm0 »

The default is 250hz?

Post Reply