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

linux/common-config: enable options needed to use sched-ext schedulers #351977

Closed
wants to merge 1 commit into from

Conversation

JohnRTitor
Copy link
Contributor

Sched-ext support has been merged to 6.12 tree, this commit enables the feature accross Nixpkgs kernels 6.12+.

Docs: https://www.kernel.org/doc/html/v6.12-rc2/scheduler/sched-ext.html#switching-to-and-from-sched-ext

Possible regressions

tests.installer.simpleUefiSystemdBoot.x86_64-linux may fail, see #79304.

@JohnRTitor JohnRTitor requested review from K900 and Ma27 October 28, 2024 20:37
@github-actions github-actions bot added the 6.topic: kernel The Linux kernel label Oct 28, 2024
BPF_SYSCALL = yes;
SCHED_CLASS_EXT = whenAtLeast "6.12" yes;
BPF_JIT = whenPlatformHasEBPFJit yes;
BPF_JIT_ALWAYS_ON = whenPlatformHasEBPFJit (whenAtLeast "6.12" yes); # whenPlatformHasEBPFJit yes; # see https://github.com/NixOS/nixpkgs/issues/79304
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was disabled by default, due to tests.installer.simpleUefiSystemdBoot.x86_64-linux failing (#79304). I moved the option around and enabled it for 6.12+.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extremely doubt that it's actually necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the kernel docs recommend to enable it, that's why I made the change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see stronger justification than "the kernel docs say to enable it for this one feature". CONFIG_SCHED_CLASS_EXT does not actually depend on it, and enabling it comes with performance and security implications.

Copy link
Contributor Author

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise that some options are already enabled/disabled in other sub categories, but to "better group" these for sched-ext I moved some things around. Please feel free to edit my branch/point out if I made a mistake.

(Note: this is my first change to kernel config, so go easy on me if I messed up)

@JohnRTitor
Copy link
Contributor Author

@ofborg test tests.installer.simpleUefiSystemdBoot.x86_64-linux

Copy link
Contributor

@K900 K900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my comments above, this PR does absolutely nothing.

@K900
Copy link
Contributor

K900 commented Oct 28, 2024

Diffing the configuration file, this is the only change:

--- result-old  1970-01-01 03:00:01.000000000 +0300
+++ result      1970-01-01 03:00:01.000000000 +0300
@@ -122,7 +122,7 @@
 #
 CONFIG_BPF_SYSCALL=y
 CONFIG_BPF_JIT=y
-# CONFIG_BPF_JIT_ALWAYS_ON is not set
+CONFIG_BPF_JIT_ALWAYS_ON=y
 CONFIG_BPF_JIT_DEFAULT_ON=y
 CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
 # CONFIG_BPF_PRELOAD is not set

Which I fundamentally do not think should be applied without much stronger justification.

Sched-ext support has been merged to 6.12 tree, this commit enables the feature accross Nixpkgs kernels 6.12+.

`BPF_JIT_DEFAULT_ON`, `PAHOLE_HAS_SPLIT_BTF` and `PAHOLE_HAS_BTF_TAG` are enabled by default in config scripts.

Docs: https://www.kernel.org/doc/html/v6.12-rc2/scheduler/sched-ext.html#switching-to-and-from-sched-ext
@JohnRTitor
Copy link
Contributor Author

Which I fundamentally do not think should be applied without much stronger justification.

I am not entirely sure about the inner workings, though I suspect that as it's in the kernel docs for sched-ext, without it sched-ext may not function as intended. (just a guess)

@K900
Copy link
Contributor

K900 commented Oct 28, 2024

Don't guess.

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

Successfully merging this pull request may close these issues.

2 participants