scheduler: use sched_setattr#1166
Merged
flouthoc merged 1 commit intocontainers:mainfrom Mar 16, 2023
Merged
Conversation
Member
|
LGTM |
replace sched_setscheduler() with sched_setattr(). The sched_setattr() function allows setting multiple attributes at once, including the scheduling policy, priority, runtime, deadline, period, and other scheduling options. This feature provides more flexibility and control over the scheduling of processes within containers and can improve resource utilization and performance in specific use cases. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
3b88716 to
5d54a85
Compare
Member
Author
|
I think this makes sense as part of the runtime-specs: opencontainers/runtime-spec#1188 |
hswong3i
added a commit
to alvistack/containers-crun
that referenced
this pull request
Mar 23, 2023
The newly introduced `src/libcrun/scheduler.c` by containers#1166 missing `#include <linux/sched.h>` for CentOS 7, which result with missing `SCHED_DEADLINE`. Moreover, for CentOS 7 build we also need to enable `-std=c99`, or upgrade build tools to gcc 11 with `. /opt/rh/devtoolset-11/enable` before build. See https://stackoverflow.com/a/50085457 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i
added a commit
to alvistack/containers-crun
that referenced
this pull request
Mar 23, 2023
The newly introduced `src/libcrun/scheduler.c` by containers#1166 missing `#include <linux/sched.h>` for CentOS 7, which result with missing `SCHED_DEADLINE`. Moreover, for CentOS 7 build we also need to enable `-std=c99`, or upgrade build tools to gcc 11 with `. /opt/rh/devtoolset-11/enable` before build. See https://stackoverflow.com/a/50085457 See https://github.com/alvistack/containers-crun/blob/alvistack/1.8.2/crun.spec Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
replace sched_setscheduler() with sched_setattr().
The sched_setattr() function allows setting multiple attributes at once, including the scheduling policy, priority, runtime, deadline, period, and other scheduling options. This feature provides more flexibility and control over the scheduling of processes within containers and can improve resource utilization and performance in specific use cases.