container: expose priority and SCHED_OTHER policy
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / ShareFS (push) Successful in 40s
Test / Sandbox (push) Successful in 46s
Test / Sandbox (race detector) (push) Successful in 45s
Test / Hakurei (push) Successful in 52s
Test / Hakurei (race detector) (push) Successful in 50s
Test / Flake checks (push) Successful in 1m14s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / ShareFS (push) Successful in 40s
Test / Sandbox (push) Successful in 46s
Test / Sandbox (race detector) (push) Successful in 45s
Test / Hakurei (push) Successful in 52s
Test / Hakurei (race detector) (push) Successful in 50s
Test / Flake checks (push) Successful in 1m14s
The more explicit API removes the arbitrary limit preventing use of SCHED_OTHER (referred to as SCHED_NORMAL in the kernel). This change also exposes priority value to set. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -134,7 +134,7 @@ func (policy SchedPolicy) GetPriorityMax() (Int, error) {
|
||||
0, 0,
|
||||
)
|
||||
schedPriority[policy][0] = Int(priority)
|
||||
if schedPriority[policy][0] < 0 {
|
||||
if errno != 0 {
|
||||
schedPriorityErr[policy][0] = errno
|
||||
}
|
||||
})
|
||||
@@ -151,10 +151,9 @@ func (policy SchedPolicy) GetPriorityMin() (Int, error) {
|
||||
0, 0,
|
||||
)
|
||||
schedPriority[policy][1] = Int(priority)
|
||||
if schedPriority[policy][1] < 0 {
|
||||
if errno != 0 {
|
||||
schedPriorityErr[policy][1] = errno
|
||||
}
|
||||
})
|
||||
return schedPriority[policy][1], schedPriorityErr[policy][1]
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user