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

drivers/raw_exec: enable configuring raw_exec task to have no memory limit #19670

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Jan 8, 2024

This PR makes it possible to configure a raw_exec task to not have an
upper memory limit, which is how the driver would behave pre-1.7.

This is done by setting memory_max = -1. The cluster (or node pool) must
have memory oversubscription enabled.

Closes #19670

Backport to 1.7 so users can re-enable behavior from before.

…limit

This PR makes it possible to configure a raw_exec task to not have an
upper memory limit, which is how the driver would behave pre-1.7.

This is done by setting memory_max = -1. The cluster (or node pool) must
have memory oversubscription enabled.
@shoenig shoenig added the backport/1.7.x backport to 1.7.x release line label Jan 9, 2024
@shoenig shoenig marked this pull request as ready for review January 9, 2024 14:04
@shoenig shoenig requested review from lgfa29 and gulducat January 9, 2024 14:05
Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -226,7 +234,11 @@ func (e *UniversalExecutor) configureCG2(cgroup string, command *ExecCommand) {
// write memory cgroup files
memHard, memSoft := e.computeMemory(command)
ed := cgroupslib.OpenPath(cgroup)
_ = ed.Write("memory.max", strconv.FormatInt(memHard, 10))
if memHard == memoryNoLimit {
_ = ed.Write("memory.max", "max")
Copy link
Member

Choose a reason for hiding this comment

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

just noting here that "max" is a magic word indicating no limit, ref:

https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git/tree/Documentation/admin-guide/cgroup-v2.rst#n667

Limits are in the range [0, max] and defaults to "max", which is noop.

@shoenig shoenig merged commit cb7d078 into main Jan 9, 2024
23 checks passed
@shoenig shoenig deleted the rawexec-max-memory branch January 9, 2024 20:57
shoenig added a commit that referenced this pull request Jan 11, 2024
…limit (#19670)

* drivers/raw_exec: enable configuring raw_exec task to have no memory limit

This PR makes it possible to configure a raw_exec task to not have an
upper memory limit, which is how the driver would behave pre-1.7.

This is done by setting memory_max = -1. The cluster (or node pool) must
have memory oversubscription enabled.

* cl: add cl
shoenig added a commit that referenced this pull request Jan 11, 2024
…limit (#19670) (#19690)

* drivers/raw_exec: enable configuring raw_exec task to have no memory limit

This PR makes it possible to configure a raw_exec task to not have an
upper memory limit, which is how the driver would behave pre-1.7.

This is done by setting memory_max = -1. The cluster (or node pool) must
have memory oversubscription enabled.

* cl: add cl

Co-authored-by: Seth Hoenig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.7.x backport to 1.7.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants