Skip to content

Conversation

@rata
Copy link
Member

@rata rata commented Sep 17, 2025

Backport of #4893 to v1.3


When a non–page-aligned value is written to memory.max, the kernel aligns it down to the nearest page boundary. On systems with a page size greater than 4K (e.g., 64K), this caused failures because the configured memory.max value was not 64K aligned.

This patch fixes the issue by explicitly aligning the memory.max value to 64K. Since 64K is also a multiple of 4K, the value is correctly aligned on both 4K and 64K page size systems.

However, this approach will still fail on systems where the hardcoded memory.max value is not aligned to the system page size.

Fixes: #4841

(cherry picked from commit 830c479)

When a non–page-aligned value is written to memory.max, the kernel aligns it
down to the nearest page boundary. On systems with a page size greater
than 4K (e.g., 64K), this caused failures because the configured
memory.max value was not 64K aligned.

This patch fixes the issue by explicitly aligning the memory.max value
to 64K. Since 64K is also a multiple of 4K, the value is correctly
aligned on both 4K and 64K page size systems.

However, this approach will still fail on systems where the hardcoded
memory.max value is not aligned to the system page size.

Fixes: opencontainers#4841

Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>
Signed-off-by: Donet Tom <donettom@linux.ibm.com>
(cherry picked from commit 830c479)
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
@rata rata changed the title tests/int/cgroups: Use 64K aligned limits for memory.max [1.3] tests/int/cgroups: Use 64K aligned limits for memory.max Sep 17, 2025
@rata rata added the area/ci label Sep 17, 2025
@rata rata enabled auto-merge September 17, 2025 10:11
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

lgtm

@rata rata merged commit df25d7c into opencontainers:release-1.3 Sep 18, 2025
36 checks passed
@kolyshkin kolyshkin added the backport/1.3-pr A backport PR to release-1.3 label Sep 18, 2025
@kolyshkin kolyshkin added this to the 1.3.2 milestone Sep 24, 2025
@kolyshkin kolyshkin mentioned this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport/1.3-pr A backport PR to release-1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants