NACK: [SRU][Jammy][lowlatency] Ubuntu: [Config] lowlatency: enhance desktop responsiveness

Dimitri John Ledkov dimitri.ledkov at canonical.com
Wed Nov 8 08:03:47 UTC 2023


On Mon, 30 Oct 2023 at 19:09, Gerald Yang <gerald.yang at canonical.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2023007
>
> [Impact]
>
> The lowlatency kernel in Ubuntu is specifically designed to prioritize
> high responsiveness, making it ideal for multimedia environments like
> DAWs and audio processing platforms, as well as soft real-time
> environments.
>
> With the introduction of a real-time kernel, it might be worth
> reconsidering the role of the lowlatency kernel and potentially
> including it as the default kernel in desktop images, focusing on its
> suitability for desktop-oriented usage.
>
> To achieve this, we can enable additional configuration settings and
> make it more focused for a low-latency and highly responsive desktop
> environment.
>
> Optionally (for the future) provide also an additional user-space
> package that would enable specific run-time kernel settings focused at
> certain preset workload profiles (e.g, web navigation, gaming, audio
> processing, etc.).
>
> [Test case]
>
> Use linux-lowlatency in a desktop environment and measure responsiveness
> of interactive applications.
>
> [Fix]
>
> Enable the following additional .config settings to make this kernel
> more suitable for a low-latency desktop kernel:

After careful assessment, this is not suitable for SRU and will
regress the available portfolio of kernels we make available on Focal.
As it is a feature, not a bug.

Whilst all of the above is true, and this will ship in the GA in noble
and in jammy-lowlatency-hwe, it is not an appropriate change for
jammy-ga, nor for focal backports. This is primarily due to lack of an
Ubuntu Realtime Kernel offering on the focal series.

My recommendation is to upgrade to jammy, and opt into either
lowlatency-hwe or realtime kernel in jammy as appropriate. Or wait a
little bit and upgrade to noble.

The jammy GA and focal HWE are otherwise frozen for changes like this,
at the very least since summer 2022.

>
>  - 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 not processed by kernel threads)
>
> [Regression potential]
>
>    Enabling all these settings can introduce a potential performance
>    regression, but the kernel should result more responsive and make
>    it more suitable for a desktop/multimedia/gaming/audio processing
>    context.
>
> Signed-off-by: Gerald Yang <gerald.yang at canonical.com>
> ---
>  debian.lowlatency/config/annotations | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/debian.lowlatency/config/annotations b/debian.lowlatency/config/annotations
> index 694ae26b6745..3e1556d60809 100644
> --- a/debian.lowlatency/config/annotations
> +++ b/debian.lowlatency/config/annotations
> @@ -15,12 +15,20 @@ 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_VOLUNTARY                        policy<{'amd64': 'n', 'arm64': 'n'}>
>  CONFIG_PREEMPT_VOLUNTARY                        note<'Disable voluntary preemption model'>
>
> +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)'>
>
>  # ---- Annotations without notes ----
>
> @@ -55,6 +63,8 @@ CONFIG_CEC_PIN                                  policy<{'amd64': 'y', 'arm64': '
>  CONFIG_CEC_PIN_ERROR_INJ                        policy<{'amd64': 'n', 'arm64': 'n'}>
>  CONFIG_COMEDI_TESTS_EXAMPLE                     policy<{'amd64': 'n', 'arm64': 'm'}>
>  CONFIG_COMEDI_TESTS_NI_ROUTES                   policy<{'amd64': 'n', 'arm64': 'm'}>
> +CONFIG_CONTEXT_TRACKING                         policy<{'amd64': 'y', 'arm64': 'y'}>
> +CONFIG_CONTEXT_TRACKING_FORCE                   policy<{'amd64': 'n', 'arm64': 'n'}>
>  CONFIG_DEBUG_PREEMPT                            policy<{'amd64': 'n', 'arm64': 'n'}>
>  CONFIG_HZ                                       policy<{'amd64': '1000', 'arm64': '1000'}>
>  CONFIG_INLINE_READ_LOCK                         policy<{'arm64': '-'}>
> @@ -89,4 +99,7 @@ CONFIG_PREEMPT_RCU                              policy<{'amd64': 'y', 'arm64': '
>  CONFIG_PREEMPT_TRACER                           policy<{'amd64': 'n', 'arm64': 'n'}>
>  CONFIG_TASKS_RCU                                policy<{'amd64': 'y', 'arm64': 'y'}>
>  CONFIG_TEST_DIV64                               policy<{'amd64': 'm', 'arm64': 'm'}>
> +CONFIG_TICK_CPU_ACCOUNTING                      policy<{'amd64': '-', 'arm64': '-'}>
>  CONFIG_UNINLINE_SPIN_UNLOCK                     policy<{'amd64': 'y', 'arm64': 'y'}>
> +CONFIG_VIRT_CPU_ACCOUNTING                      policy<{'amd64': 'y', 'arm64': 'y'}>
> +CONFIG_VIRT_CPU_ACCOUNTING_GEN                  policy<{'amd64': 'y', 'arm64': 'y'}>
> --
> 2.25.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



-- 
okurrr,

Dimitri



More information about the kernel-team mailing list