[01/13] kernel: Change timer tick to 1000Hz

Message ID 20210917114229.10704-1-michael.tremer@ipfire.org
State New
Headers show
Series [01/13] kernel: Change timer tick to 1000Hz | expand

Commit Message

Michael Tremer Sept. 17, 2021, 11:42 a.m. UTC
This change is required to make the system respond faster to any
realtime events (sending or receiving data packets).

It will wake up at least one core 1000 times a second which will result
in finer timer granularity and make scheduling smoother. HTB for
example sends large packet bursts on each timer even to keep up data
rates which is not helpful for most applications.

The change might increase resource consumption and overhead slightly on
some systems, but since we are running in an idle-dyntick configuration,
we should not keep awake any cores that have not been awake before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/kernel/kernel.config.aarch64-ipfire | 6 +++---
 config/kernel/kernel.config.armv6l-ipfire  | 6 +++---
 config/kernel/kernel.config.i586-ipfire    | 6 +++---
 config/kernel/kernel.config.x86_64-ipfire  | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

Comments

Peter Müller Sept. 18, 2021, 4:09 p.m. UTC | #1
Acked-by: Peter Müller <peter.mueller@ipfire.org>


> This change is required to make the system respond faster to any
> realtime events (sending or receiving data packets).
> 
> It will wake up at least one core 1000 times a second which will result
> in finer timer granularity and make scheduling smoother. HTB for
> example sends large packet bursts on each timer even to keep up data
> rates which is not helpful for most applications.
> 
> The change might increase resource consumption and overhead slightly on
> some systems, but since we are running in an idle-dyntick configuration,
> we should not keep awake any cores that have not been awake before.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>   config/kernel/kernel.config.aarch64-ipfire | 6 +++---
>   config/kernel/kernel.config.armv6l-ipfire  | 6 +++---
>   config/kernel/kernel.config.i586-ipfire    | 6 +++---
>   config/kernel/kernel.config.x86_64-ipfire  | 6 +++---
>   4 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire
> index 450835d8b..54cd7c084 100644
> --- a/config/kernel/kernel.config.aarch64-ipfire
> +++ b/config/kernel/kernel.config.aarch64-ipfire
> @@ -370,11 +370,11 @@ CONFIG_NR_CPUS=8
>   CONFIG_HOTPLUG_CPU=y
>   # CONFIG_NUMA is not set
>   CONFIG_HOLES_IN_ZONE=y
> -CONFIG_HZ_100=y
> +# CONFIG_HZ_100 is not set
>   # CONFIG_HZ_250 is not set
>   # CONFIG_HZ_300 is not set
> -# CONFIG_HZ_1000 is not set
> -CONFIG_HZ=100
> +CONFIG_HZ_1000=y
> +CONFIG_HZ=1000
>   CONFIG_SCHED_HRTICK=y
>   CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
>   CONFIG_ARCH_SPARSEMEM_ENABLE=y
> diff --git a/config/kernel/kernel.config.armv6l-ipfire b/config/kernel/kernel.config.armv6l-ipfire
> index b1af6555c..6fe17954d 100644
> --- a/config/kernel/kernel.config.armv6l-ipfire
> +++ b/config/kernel/kernel.config.armv6l-ipfire
> @@ -588,13 +588,13 @@ CONFIG_HOTPLUG_CPU=y
>   CONFIG_ARM_PSCI=y
>   CONFIG_ARCH_NR_GPIO=512
>   CONFIG_HZ_FIXED=0
> -CONFIG_HZ_100=y
> +# CONFIG_HZ_100 is not set
>   # 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_HZ_1000=y
> +CONFIG_HZ=1000
>   CONFIG_SCHED_HRTICK=y
>   CONFIG_ARM_PATCH_IDIV=y
>   CONFIG_AEABI=y
> diff --git a/config/kernel/kernel.config.i586-ipfire b/config/kernel/kernel.config.i586-ipfire
> index 5f5a496a8..a915682e4 100644
> --- a/config/kernel/kernel.config.i586-ipfire
> +++ b/config/kernel/kernel.config.i586-ipfire
> @@ -438,11 +438,11 @@ CONFIG_X86_INTEL_TSX_MODE_OFF=y
>   # CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
>   CONFIG_EFI=y
>   CONFIG_EFI_STUB=y
> -CONFIG_HZ_100=y
> +# CONFIG_HZ_100 is not set
>   # CONFIG_HZ_250 is not set
>   # CONFIG_HZ_300 is not set
> -# CONFIG_HZ_1000 is not set
> -CONFIG_HZ=100
> +CONFIG_HZ_1000=y
> +CONFIG_HZ=1000
>   CONFIG_SCHED_HRTICK=y
>   # CONFIG_KEXEC is not set
>   CONFIG_CRASH_DUMP=y
> diff --git a/config/kernel/kernel.config.x86_64-ipfire b/config/kernel/kernel.config.x86_64-ipfire
> index f8289aeb8..730e0791e 100644
> --- a/config/kernel/kernel.config.x86_64-ipfire
> +++ b/config/kernel/kernel.config.x86_64-ipfire
> @@ -430,11 +430,11 @@ CONFIG_X86_INTEL_TSX_MODE_OFF=y
>   CONFIG_EFI=y
>   CONFIG_EFI_STUB=y
>   CONFIG_EFI_MIXED=y
> -CONFIG_HZ_100=y
> +# CONFIG_HZ_100 is not set
>   # CONFIG_HZ_250 is not set
>   # CONFIG_HZ_300 is not set
> -# CONFIG_HZ_1000 is not set
> -CONFIG_HZ=100
> +CONFIG_HZ_1000=y
> +CONFIG_HZ=1000
>   CONFIG_SCHED_HRTICK=y
>   # CONFIG_KEXEC is not set
>   # CONFIG_KEXEC_FILE is not set
>

Patch

diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire
index 450835d8b..54cd7c084 100644
--- a/config/kernel/kernel.config.aarch64-ipfire
+++ b/config/kernel/kernel.config.aarch64-ipfire
@@ -370,11 +370,11 @@  CONFIG_NR_CPUS=8
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_NUMA is not set
 CONFIG_HOLES_IN_ZONE=y
-CONFIG_HZ_100=y
+# CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
 CONFIG_SCHED_HRTICK=y
 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
diff --git a/config/kernel/kernel.config.armv6l-ipfire b/config/kernel/kernel.config.armv6l-ipfire
index b1af6555c..6fe17954d 100644
--- a/config/kernel/kernel.config.armv6l-ipfire
+++ b/config/kernel/kernel.config.armv6l-ipfire
@@ -588,13 +588,13 @@  CONFIG_HOTPLUG_CPU=y
 CONFIG_ARM_PSCI=y
 CONFIG_ARCH_NR_GPIO=512
 CONFIG_HZ_FIXED=0
-CONFIG_HZ_100=y
+# CONFIG_HZ_100 is not set
 # 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_HZ_1000=y
+CONFIG_HZ=1000
 CONFIG_SCHED_HRTICK=y
 CONFIG_ARM_PATCH_IDIV=y
 CONFIG_AEABI=y
diff --git a/config/kernel/kernel.config.i586-ipfire b/config/kernel/kernel.config.i586-ipfire
index 5f5a496a8..a915682e4 100644
--- a/config/kernel/kernel.config.i586-ipfire
+++ b/config/kernel/kernel.config.i586-ipfire
@@ -438,11 +438,11 @@  CONFIG_X86_INTEL_TSX_MODE_OFF=y
 # CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
 CONFIG_EFI=y
 CONFIG_EFI_STUB=y
-CONFIG_HZ_100=y
+# CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
 CONFIG_SCHED_HRTICK=y
 # CONFIG_KEXEC is not set
 CONFIG_CRASH_DUMP=y
diff --git a/config/kernel/kernel.config.x86_64-ipfire b/config/kernel/kernel.config.x86_64-ipfire
index f8289aeb8..730e0791e 100644
--- a/config/kernel/kernel.config.x86_64-ipfire
+++ b/config/kernel/kernel.config.x86_64-ipfire
@@ -430,11 +430,11 @@  CONFIG_X86_INTEL_TSX_MODE_OFF=y
 CONFIG_EFI=y
 CONFIG_EFI_STUB=y
 CONFIG_EFI_MIXED=y
-CONFIG_HZ_100=y
+# CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
 CONFIG_SCHED_HRTICK=y
 # CONFIG_KEXEC is not set
 # CONFIG_KEXEC_FILE is not set