This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
realtime:documentation:howto:tools:ticklesskernel [2023/08/20 10:03] costa.shul update, links |
realtime:documentation:howto:tools:ticklesskernel [2023/10/03 08:20] (current) costa.shul change title |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Tickless Kernel ====== | + | ====== Dynticks or Tickless kernel or nohz ====== |
- | Previously, the Linux kernel had by default a periodic interrupt that made the kernel scheduler to balance and schedule threads running among the CPU's, this interrupt is known as the timer tick and it was generated at a fix rate 1000 HZ. | + | For a long time Linux kernel have a periodic interrupt that makes the kernel scheduler to balance and schedule threads running among the CPU's. |
- | This mode enabled by option [[https://elixir.bootlin.com/linux/latest/A/ident/CONFIG_HZ_PERIODIC|CONFIG_HZ_PERIODIC]]. | + | This interrupt is known as the **timer tick** and it is generated at a fixed rate 100-1000 HZ on each CPU or core. |
The kernel serviced this interrupt regardless of the power state of the CPU. | The kernel serviced this interrupt regardless of the power state of the CPU. | ||
+ | This mode is enabled by option ''CONFIG_HZ_PERIODIC''. | ||
- | [[https://elixir.bootlin.com/linux/latest/A/ident/CONFIG_NO_HZ_IDLE|NO_HZ_IDLE]] allows the CPU not to be disturbed when idle and can save power because it just wakes up the CPU when needed to service the timer. | + | ''CONFIG_NO_HZ_IDLE'' mode allows the CPU not to be disturbed when idle and can save power because it just wakes up the CPU when needed to service the timer. |
- | Full dynticks system (tickless), or [[https://elixir.bootlin.com/linux/latest/A/ident/CONFIG_NO_HZ_FULL|NO_HZ_FULL]], is a configuration option in the kernel that allows it to run without a periodic timer tick at all. | + | Full dynticks system (tickless) mode is enabled by ''CONFIG_NO_HZ_FULL'' and activated by [[https://docs.kernel.org/admin-guide/kernel-parameters.html#cpu-lists|nohz_full boot parameter]]. |
+ | The kernel adaptively tries to shutdown the tick whenever possible, even when the CPU is running tasks with function ''tick_nohz_full_cpu''. | ||
- | ===== More Information ===== | ||
- | * [[https://www.suse.com/c/cpu-isolation-full-dynticks-part2/|CPU Isolation – Full dynticks internals]] | ||
+ | More information: | ||
+ | * [[https://www.suse.com/c/cpu-isolation-full-dynticks-part2/|CPU Isolation – Full dynticks internals]] | ||
+ | * [[https://en.wikipedia.org/wiki/Tickless_kernel|Tickless kernel]] | ||
+ | * [[https://docs.kernel.org/timers/no_hz.html|NO_HZ: Reducing Scheduling-Clock Ticks]] | ||
+ | * [[https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/Kconfig.hz|kernel/Kconfig.hz]] | ||
+ | * [[https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/time/Kconfig|kernel/time/Kconfig]] |