Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable low-jitter kernel options for kernel-6.1 #3961

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

james-masson
Copy link

Issue number:

From private discussions.

Description of changes:

Enabling a selection of Kernel build-options to allow users to select various low-latency and low-jitter behaviours from the kernel.

These kernel options are fairly typical, you'll find them in Redhat and Ubuntu distro kernels.

None of these options do anything without the user opting into them via kernel parameters - default behaviour for your users will stay the same.

Testing done:

Local build and deploy into our AWS accounts, benchmarking using these kernel options.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@bcressey
Copy link
Contributor

None of these options do anything without the user opting into them via kernel parameters - default behaviour for your users will stay the same.

We'll need to run this by the Amazon Linux kernel engineers. Ideally the change would happen upstream in the AL kernels, or at least we'd have some indication that they're likely to be picked up there. It's also not necessarily what the default is that matters: if it's possible to enable something, and people do, ideally that wouldn't push them into an unsupported state.

@yeazelm
Copy link
Contributor

yeazelm commented May 15, 2024

I took a look at this and we already have a few of these enabled in the 6.1 kernel, here are the ones that are not:
CONFIG_RCU_NOCB_CPU=y isn't set.

CONFIG_CONTEXT_TRACKING_USER=y isn't set but CONFIG_HAVE_CONTEXT_TRACKING_USER=y and CONFIG_CONTEXT_TRACKING=y and CONFIG_CONTEXT_TRACKING_IDLE=y are set.

CONFIG_NO_HZ_FULL=y is not set but CONFIG_NO_HZ_IDLE=y is set.

The rest already exist. I'll follow up when I have some answers as @bcressey mentioned I'd like to see if we can include these in Amazon Linux as well so these settings are consistent for both. Thanks for bringing this up @james-masson!

@james-masson
Copy link
Author

CONFIG_RCU_NOCB_CPU=y isn't set.

CONFIG_NO_HZ_FULL=y is not set

These are the two important ones. They enable the functionality we need.

@james-masson
Copy link
Author

Updated the PR to include just the specific modules to enable, not the full config.

@arnaldo2792
Copy link
Contributor

Dumb question @james-masson , will it be possible to make them m instead of y?

@james-masson
Copy link
Author

Dumb question @james-masson , will it be possible to make them m instead of y?

No, it's a boolean.

https://github.com/torvalds/linux/blob/e0cce98fe279b64f4a7d81b7f5c3a23d80b92fbc/kernel/time/Kconfig#L124

It's not a self-contained bit of functionality like a device driver.
It's a switch that enables alternative behaviour in the scheduler and IRQ handling and similar.

@james-masson
Copy link
Author

Dumb question @james-masson , will it be possible to make them m instead of y?

It's a switch that enables alternative behaviour in the scheduler and IRQ handling and similar.

I perhaps wasn't clear enough here...

Enabling this kernel build config does not change any default behaviour in the kernel AFAIK. It just enables a capability in the kernel.

Only when you set rcu_nocbs=<insert-cpu-list-here> as a kernel parameter does the behaviour change, and that's something you always want to leave to the user.

It's a similar situation with the nohz_full kernel parameter. The kernel build config just enables the capability, user opts-in to the capability with a kernel parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants