Skip to content

config: azurelinux 3.0 kernel config #8953

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

Open
wants to merge 7 commits into
base: 3.0-dev
Choose a base branch
from

Conversation

allenpais
Copy link

Optimize and Converge Kernel Configuration for Enhanced Performance and Maintainability

This config is a based on:
https://github.com/microsoft/azurelinux/blob/3.0/SPECS/kernel/config

Key Changes:

  • Deprecated outdated configuration options that no longer provide benefits in current hardware and software contexts.

  • We are suggesting these optimizations for our WSL/LCOW convergence to azurelinux.

Optimize and Converge Kernel Configuration for Enhanced
Performance and Maintainability

This config is a based on:
https://github.com/microsoft/azurelinux/blob/3.0/SPECS/kernel/config

Key Changes:
  - Deprecated outdated configuration options that no longer
    provide benefits in current hardware and software contexts.

  - We are suggesting these optimizations for our WSL/LCOW
    convergence to azurelinux.

Signed-off-by: Allen Pais <apais@linux.microsoft.com>
@allenpais allenpais requested a review from a team as a code owner April 29, 2024 23:37
@allenpais
Copy link
Author

@rlmenge Please review.

@rlmenge rlmenge self-requested a review April 29, 2024 23:41
# CONFIG_KEXEC_SIG is not set
# CONFIG_KEXEC_JUMP is not set
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set
Copy link

Choose a reason for hiding this comment

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

I don't think we should disable CONFIG_KEXEC_FILE. I would be fine with disabling CONFIG_KEXEC, however, since it cannot and will not ever support signature verification.

Copy link

Choose a reason for hiding this comment

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

@allenpais ping on this. CONFIG_KEXEC_FILE still needs to be enabled for kexec support. We only want to disable CONFIG_KEXEC.

@tyhicks
Copy link

tyhicks commented Apr 30, 2024

@allenpais I was hoping we could disable all but perhaps one of the CONFIG_RD_* options to reduce image size.

 As suggested by Tyler:
   Keep CONFIG_KEXEC_FILE enabled.
   Remove unused CONFIG_RD_* configs.

Signed-off-by: Allen Pais <apais@linux.microsoft.com>
@allenpais
Copy link
Author

@tyhicks Thanks for taking the time out to review. I have addressed your feedback. There will probably be one or two more commits that will go in. I should have it pushed soon.

Copy link
Contributor

@rlmenge rlmenge left a comment

Choose a reason for hiding this comment

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

I was able to cherry-pick a majority of these changes onto a test branch and build a test azl3 RPM!

  • created new branch off of 6.6.29.1 upgrade PR
  • cherry-picked the 2 commits from this PR (required a small git merge to match 6.6.29.1)
  • updated the spec and configs to match Azure Linux toolchain for 3.0
  • Built the rpm :) (pipeline run)

It will not properly make an initramfs at the moment because dracut explicitly expects xen modules. We can/should change dracut from relying on xen but this along with the kernel config xen changes should be its own PR

  - Re-enable support for XEN
  - Additional configs required to boot LCOW

Signed-off-by: Allen Pais <apais@linux.microsoft.com>
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130200
CONFIG_GCC_VERSION=110200
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a detail of the toolchain you ran make on; we can safely revert this section to its original 3.0-dev values.

CONFIG_NET_9P_XEN=m
CONFIG_NET_9P=y
CONFIG_NET_9P_FD=y
CONFIG_NET_9P_VIRTIO=y
Copy link
Contributor

Choose a reason for hiding this comment

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

We are simultaneously trying to figure out the set of kernel modules to include in our initramfs. Dracut is rather pedantic about this; I'm pretty sure it'll complain if a module stops existing (even if it is built-in).

https://github.com/microsoft/azurelinux/pull/9144/files#diff-dddc34dca2f7bebb34fd880ce85f99a512ca0e73d5e2ecf571b0b741ea4c07f2R2

@Camelron
Copy link
Contributor

I was able to cherry-pick a majority of these changes onto a test branch and build a test azl3 RPM!

  • created new branch off of 6.6.29.1 upgrade PR
  • cherry-picked the 2 commits from this PR (required a small git merge to match 6.6.29.1)
  • updated the spec and configs to match Azure Linux toolchain for 3.0
  • Built the rpm :) (pipeline run)

It will not properly make an initramfs at the moment because dracut explicitly expects xen modules. We can/should change dracut from relying on xen but this along with the kernel config xen changes should be its own PR

Right, we are currently in the middle of a rework to the set of kernel modules needed by dracut which we will have to sync with this change: #9144

allenpais and others added 4 commits May 21, 2024 18:53
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Build in configs that are called and used during the WSL2 boot.

NF/NFT/NETLINK configs are required for when mirrored networking is
enabled.

DXGKRNL creates /dev/dxg device, when vGPU is available. Driver is not
called by applications unless the /dev/dxg already exists.

Signed-off-by: Kelsey Steele <kelseysteele@microsoft.com>
…pdates

kernel: config: build in configs required for WSL2 boot
This reverts commit f96b7b1.

 Revert WSL config changes.

Signed-off-by: Allen Pais <apais@linux.microsoft.com>
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.

5 participants