Skip to content

libct/cg: support SCHED_IDLE for runc cgroupfs#3377

Merged
kolyshkin merged 1 commit into
opencontainers:mainfrom
wineway:main
Feb 1, 2023
Merged

libct/cg: support SCHED_IDLE for runc cgroupfs#3377
kolyshkin merged 1 commit into
opencontainers:mainfrom
wineway:main

Conversation

@wineway
Copy link
Copy Markdown
Contributor

@wineway wineway commented Feb 16, 2022

@wineway wineway force-pushed the main branch 3 times, most recently from d06fe5a to f9ca48b Compare May 6, 2022 06:38
@wineway wineway changed the title libct/cg: support SCHED_IDLE for runc libct/cg: support SCHED_IDLE for runc cgroupfs May 6, 2022
@wineway wineway force-pushed the main branch 2 times, most recently from 482bccd to fa7fb14 Compare May 6, 2022 07:06
@wineway wineway marked this pull request as ready for review May 6, 2022 07:10
@wineway
Copy link
Copy Markdown
Contributor Author

wineway commented May 6, 2022

@kolyshkin PTAL

@wineway wineway mentioned this pull request May 9, 2022
@wineway wineway force-pushed the main branch 2 times, most recently from c918a6c to b108c38 Compare May 11, 2022 10:54
Comment thread libcontainer/cgroups/fs/cpu.go
Comment thread libcontainer/cgroups/fs2/cpu.go Outdated
Comment on lines +18 to +22
if r.CpuIdle != nil {
if err := cgroups.WriteFile(dirPath, "cpu.idle", strconv.FormatInt(*r.CpuIdle, 10)); err != nil {
return err
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can move this below to after if !isCpuSet(r).

Comment thread libcontainer/configs/cgroup_linux.go Outdated
// MEM to use
CpusetMems string `json:"cpuset_mems"`

//nolint:revive
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe instead of ignoring revive warning, call it CPUIdle (hopefully we'll rename the rest of Cpu* fields at some point).

Comment thread libcontainer/specconv/spec_linux.go Outdated
if r.CPU.Quota != nil {
c.Resources.CpuQuota = *r.CPU.Quota
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not needed.

Copy link
Copy Markdown
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.

A few nits, plus can you please make the runtime-spec bump a separate commit (for clarity)?

@kolyshkin kolyshkin added this to the 1.2.0 milestone May 11, 2022
@kolyshkin
Copy link
Copy Markdown
Contributor

Rebased to fix CI

@wineway
Copy link
Copy Markdown
Contributor Author

wineway commented May 26, 2022

@kolyshkin Can I ask you to review it again?

@AkihiroSuda
Copy link
Copy Markdown
Member

Looks good but needs rebase

@AkihiroSuda
Copy link
Copy Markdown
Member

@wineway Could you rebase?

Signed-off-by: wineway <wangyuweihx@gmail.com>
@wineway
Copy link
Copy Markdown
Contributor Author

wineway commented Jan 31, 2023

@wineway Could you rebase?

sorry, I missed last comment; rebased

Copy link
Copy Markdown
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

@kolyshkin kolyshkin merged commit 32d7413 into opencontainers:main Feb 1, 2023
@cyphar cyphar mentioned this pull request Mar 14, 2024
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.

3 participants