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

bootscript: Remove deprecated bootarg "swapaccount=1" #6705

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

ColorfulRhino
Copy link
Collaborator

@ColorfulRhino ColorfulRhino commented Jun 8, 2024

Description

The "swapaccount=" option has been deprecated in 6.1. Disable it in almost all boot scripts except "boot-sun50iw9.cmd" since that one is used in sun50iw9 legacy kernel, which is version 4.9.

In theory, rk3588-legacy is also still <6.1, but that boot script is also used by 6.1 vendor kernel and the amount of new images being built/used with the 5.10 legacy kernel is likely minimal. As far as I know, bootscript won't update automatically, so these changes will only apply to freshly built images. Please correct me if I'm wrong.

Link to kernel commit:
torvalds/linux@b25806d

Closes issue #6633


Also, there are other kernel parameters, e.g.:

  • cgroup_enable=cpuset
  • cgroup_memory=1
  • cgroup_enable=memory

if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1"; fi

I couln't find out why cgroup_enable= is added here. The official kernel parameters doc (https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt) only lists a cgroup_disable= option.
Maybe this is some relic of the past? Does anyone know?`

Is there a way to find out on a live kernel what the boot arguments actually did?

Jira reference number AR-2321

The "swapaccount=" option has been deprecated in 6.1. Disable it in almost all boot scripts except "boot-sun50iw9.cmd" since that one is used in sun50iw9 legacy kernel, which is version 4.9.

Link to kernel commit:
torvalds/linux@b25806d
@github-actions github-actions bot added size/small PR with less then 50 lines Hardware Hardware related like kernel, U-Boot, ... labels Jun 8, 2024
@igorpecovnik
Copy link
Member

I think we can slowly start to deprecate 5.10.y on Rockchip. Regarding parameters lets wait few days if someone recalls / comment.

@igorpecovnik igorpecovnik added Discussion Being discussed - Voice your opinions :) 08 Milestone: Third quarter release labels Jun 8, 2024
Copy link
Member

@adeepn adeepn left a comment

Choose a reason for hiding this comment

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

jethub ok.

@ColorfulRhino
Copy link
Collaborator Author

I think we can slowly start to deprecate 5.10.y on Rockchip. Regarding parameters lets wait few days if someone recalls / comment.

Yes, I agree 👍

Copy link
Contributor

@joekhoobyar joekhoobyar left a comment

Choose a reason for hiding this comment

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

LGTM

@rpardini
Copy link
Member

rpardini commented Jun 9, 2024

some relic of the past

Yes!

The bummer here is that we can't do it conditionally. But let's go ahead, if troubles pop up we adapt as it goes

@ColorfulRhino
Copy link
Collaborator Author

some relic of the past

Yes!

The bummer here is that we can't do it conditionally. But let's go ahead, if troubles pop up we adapt as it goes

Alright so we could remove cgroup_enable=cpuset and cgroup_enable=memory as well. Searching for cgroup_enable in the kernel code (Link) does not yield anything apart from static int cgroup_enable_threaded(struct cgroup *cgrp) which sounds like a different thing to me.

Do you know anything about cgroup_memory=1 ?

Maybe these options are something that are not actually for the linux kernel but for another software?
I have looked at old kernel versions like 3.10 and couldn't even find these parameters there in this list: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/kernel-parameters.txt?h=linux-3.10.y

@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Jun 25, 2024
@igorpecovnik igorpecovnik merged commit 2937ceb into armbian:main Jun 25, 2024
2 checks passed
@ColorfulRhino ColorfulRhino deleted the swappacount_deprecated branch June 25, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 Milestone: Third quarter release Discussion Being discussed - Voice your opinions :) Hardware Hardware related like kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

5 participants