[PATCH][M:lowlatency] UBUNTU: [Config] lowlatency: enhance desktop responsiveness

Andrea Righi andrea.righi at canonical.com
Tue Jun 6 08:02:29 UTC 2023


BugLink: https://bugs.launchpad.net/bugs/2023007

Enable the following kernel configs to make the lowlatency kernel more
suitable for a desktop-oriented context and give access to additional
run-time / boot-time user-space settings:

 - CONFIG_NO_HZ_FULL=y: enable access to "Full tickless mode" (shutdown
   clock tick when possible across all the enabled CPUs if they are
   either idle or running 1 task - reduce kernel jitter of running tasks
   due to the periodic clock tick, must be enabled at boot time passing
   `nohz_full=<cpu_list>`)

 - CONFIG_RCU_NOCB_CPU=y, CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y: move RCU
   callbacks from softirq context to kthread context (reduce time spent
   in softirqs with preemption disabled to improve the overall system
   responsiveness, at the cost of introducing a potential performance
   penalty, because RCU callbacks are now processed by kernel threads)

 - CONFIG_RCU_LAZY=y: batch RCU callbacks and then flush them after a
   timed delay instead of executing them immediately (can provide 5~10%
   power-savings for idle or lightly-loaded systems, this is extremely
   useful for laptops / portable devices [1])

[1] https://lore.kernel.org/lkml/20221016162305.2489629-3-joel@joelfernandes.org/

Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
 debian.lowlatency/config/annotations | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/debian.lowlatency/config/annotations b/debian.lowlatency/config/annotations
index fef2202364bc..737a55be4ae2 100644
--- a/debian.lowlatency/config/annotations
+++ b/debian.lowlatency/config/annotations
@@ -15,15 +15,35 @@ CONFIG_HZ_250                                   note<'Override default HZ used i
 CONFIG_LATENCYTOP                               policy<{'amd64': 'y', 'arm64': 'y'}>
 CONFIG_LATENCYTOP                               note<'https://lists.ubuntu.com/archives/kernel-team/2014-July/045006.html, LP#1655986'>
 
+CONFIG_NO_HZ_FULL                               policy<{'amd64': 'y', 'arm64': 'y'}>
+CONFIG_NO_HZ_FULL                               note<'Enable access to "Full tickless mode" (LP: #2023007)'>
+
+CONFIG_NO_HZ_IDLE                               policy<{'amd64': 'n', 'arm64': 'n'}>
+CONFIG_NO_HZ_IDLE                               note<'Disabled in favor of CONFIG_NO_HZ_FULL (LP: #2023007)'>
+
 CONFIG_PREEMPT                                  policy<{'amd64': 'y', 'arm64': 'y'}>
-CONFIG_PREEMPT                                  note<'Enable fully preemptible kernel'>
+CONFIG_PREEMPT                                  note<'Enable fully preemptible kernel by default (can be changed at runtime via /sys/kernel/debug/sched/preempt)'>
 
 CONFIG_PREEMPT_VOLUNTARY                        policy<{'amd64': 'n', 'arm64': 'n'}>
-CONFIG_PREEMPT_VOLUNTARY                        note<'Disable voluntary preemption model'>
+CONFIG_PREEMPT_VOLUNTARY                        note<'Disable voluntary preemption model by default (can be changed at runtime via /sys/kernel/debug/sched/preempt)'>
+
+CONFIG_RCU_LAZY                                 policy<{'amd64': 'y', 'arm64': 'y'}>
+CONFIG_RCU_LAZY                                 note<'Batch RCU callbacks and then flush them after a timed delay instead of executing them immediately (LP: #2023007)'>
+
+CONFIG_RCU_NOCB_CPU                             policy<{'amd64': 'y', 'arm64': 'y'}>
+CONFIG_RCU_NOCB_CPU                             note<'Move RCU callbacks from softirq context to kthread context (LP: #2023007)'>
+
+CONFIG_RCU_NOCB_CPU_DEFAULT_ALL                 policy<{'amd64': 'y', 'arm64': 'y'}>
+CONFIG_RCU_NOCB_CPU_DEFAULT_ALL                 note<'Enable CONFIG_RCU_NOCB_CPU across all CPUs by default (LP: #2023007)'>
 
 
 # ---- Annotations without notes ----
 
 CONFIG_CC_VERSION_TEXT                          policy<{'amd64': '"x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1) 12.3.0"', 'arm64': '"aarch64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1) 12.3.0"'}>
+CONFIG_CONTEXT_TRACKING_USER                    policy<{'amd64': 'y', 'arm64': 'y'}>
+CONFIG_CONTEXT_TRACKING_USER_FORCE              policy<{'amd64': 'n', 'arm64': 'n'}>
 CONFIG_GCC_VERSION                              policy<{'amd64': '120300', 'arm64': '120300'}>
 CONFIG_HZ                                       policy<{'amd64': '1000', 'arm64': '1000'}>
+CONFIG_TICK_CPU_ACCOUNTING                      policy<{'amd64': '-', 'arm64': '-'}>
+CONFIG_VIRT_CPU_ACCOUNTING                      policy<{'amd64': 'y', 'arm64': 'y'}>
+CONFIG_VIRT_CPU_ACCOUNTING_GEN                  policy<{'amd64': 'y', 'arm64': 'y'}>
-- 
2.39.2




More information about the kernel-team mailing list