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

The swapaccount= commandline option is deprecated. #6633

Open
1 of 2 tasks
Kreyren opened this issue May 19, 2024 · 2 comments
Open
1 of 2 tasks

The swapaccount= commandline option is deprecated. #6633

Kreyren opened this issue May 19, 2024 · 2 comments

Comments

@Kreyren
Copy link
Contributor

Kreyren commented May 19, 2024

What happened?

[ +0,000000] The swapaccount= commandline option is deprecated. Please report your usecase to [email protected] if you depend on this functionality.

This seems to be an armbian-build issue

How to reproduce?

Run any recent image on any board i assume?

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Debian 13 Trixie

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link

Jira ticket: AR-2321

@ColorfulRhino
Copy link
Collaborator

Thanks for reporting this!

This can be fixed by removing the swapaccount=1 option from all the boot scripts.

The option was deprecated in 6.1 and doesn't do much today: torvalds/linux@b25806d

Commit message:

The swapaccounting= commandline option already does very little today. To
close a trivial containment failure case, the swap ownership tracking part
of the swap controller has recently become mandatory (see commit
torvalds/linux@2d1c498 ("mm: memcontrol: make swap tracking an integral part of
memory control") for details), which makes up the majority of the work
during swapout, swapin, and the swap slot map.

The only thing left under this flag is the page_counter operations and the
visibility of the swap control files in the first place, which are rather
meager savings. There also aren't many scenarios, if any, where
controlling the memory of a cgroup while allowing it unlimited access to a
global swap space is a workable resource isolation strategy.

On the other hand, there have been several bugs and confusion around the
many possible swap controller states (cgroup1 vs cgroup2 behavior, memory
accounting without swap accounting, memcg runtime disabled).

This puts the maintenance overhead of retaining the toggle above its
practical benefits. Deprecate it.

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

No branches or pull requests

2 participants