How to change CONFIG_HZ parameter for Linux Kernel

If we want to change the tick time for Linux Kernel, we need to change CONFIG_HZ parameter in Linux Kernel. Do we have other better ways to change it rather than compiling Linux Kernel. Please ignore the way to add ‘divider=10’ in grub config file because it is limited only for RH/CentOS distros.

Zhiqiang, please answer this question if you know it. I cannot find the answer after Google for a long time. Thank you.


The HZ variable is extensively used as a macro, such as in
https://github.com/torvalds/linux/blob/e4fba88d00d21f50239eac7d653027bfaf844296/kernel/time/time.c#L277

This is likely for performance.

This may make it compile-time configurable only.


So it can only be changed by compiling a new Kernel.

Similar Posts

  • How to get an environment variable in Python?

    In Python, how to get the value (string) of an environment variable? In Python, all environment variables can be accessed directly through os.environ import os print os.environ[‘HOME’] If the environment variable is not present, it will raise a KeyError. You can use get to return None if the environment variable is not present: print os.environ.get(‘ENV_MIGHT_EXIST’)…

  • Emacs highlighting part of lines that go over 80 chars

    How to make Emacs highlighting part of lines that go over 80 chars? I use the whitespace mode: ;; `lines-tail`, highlight the part that goes beyond the ;; limit of `whitespace-line-column` (require ‘whitespace) (setq whitespace-style ‘(face empty tabs lines-tail trailing)) (global-whitespace-mode t) More: https://github.com/zma/emacs-config/blob/master/.emacs Alternatively, you can run highlight-lines-matching-regexp with the expression .{81}. http://stackoverflow.com/questions/6344474/how-can-i-make-emacs-highlight-lines-that-go-over-80-chars Read…

  • Java与C++在语言方面上的不同

    1,Java抛弃了头文件、预处理机制、goto语句和多维数组。 2,Java不支持指针。 3,Java抛弃了联合体和结构体。 4,Java不支持独立函数。所有函数必须在类中声明。 5,Java不支持多重继承,可以使用接口模拟多重继承。 6,Java不支持运算符重载。 7,Java中布尔型不再用整数来代替。 8,Java中主函数必须有一个字符串类型的参数。 Java抛弃的C++中的这些机制和结构多数都是“危险”的,减少了语言的复杂性,增强了安全性,虽然在一定程度上减少了其灵活性。 Read more: Java Calling Native Functions in .DLL on Windows OCaml Learning Materials Vim Indenting C/C++ Code How to Generate Mixed Source and Assembly List from Source Code using GCC Hashing Library for C Notes for Beginners of Software Development on Linux How to iterate all…

Leave a Reply

Your email address will not be published. Required fields are marked *