1 HZ System Tick

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

1 HZ System Tick

Postby dawnpaul100 » Thu Aug 17, 2017 5:24 am

How could we change the system tick to 1 HZ. We are using a custom board based on imx6 sabresd reference board. Currently it is set to 100 HZ.
These are the settings in .config

# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_HZ_FIXED=0
CONFIG_HZ_100=y
# CONFIG_HZ_200 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_500 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_SCHED_HRTICK=y

These values are used in the following files

include/linux/jiffies.h


# undef HZ
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* some user interfaces are */
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
#endif /* __ASM_GENERIC_PARAM_H */
~
include/asm-generic/param.h

#if HZ >= 12 && HZ < 24
# define SHIFT_HZ 4
#elif HZ >= 24 && HZ < 48
# define SHIFT_HZ 5
#elif HZ >= 48 && HZ < 96
# define SHIFT_HZ 6
#elif HZ >= 96 && HZ < 192
# define SHIFT_HZ 7
#elif HZ >= 192 && HZ < 384
# define SHIFT_HZ 8
#elif HZ >= 384 && HZ < 768
# define SHIFT_HZ 9
#elif HZ >= 768 && HZ < 1536
# define SHIFT_HZ 10
#elif HZ >= 1536 && HZ < 3072
# define SHIFT_HZ 11
#elif HZ >= 3072 && HZ < 6144
# define SHIFT_HZ 12
#elif HZ >= 6144 && HZ < 12288
# define SHIFT_HZ 13
#else
dawnpaul100
 
Posts: 1
Joined: Thu Aug 17, 2017 5:11 am

Re: 1 HZ System Tick

Postby graysky » Thu Aug 17, 2017 6:57 pm

No sure about hacking it to 1 HZ but what is your goal? Do you suspect any measurable reduction in power consumption?
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 6 guests