hst: expose scheduling priority
All checks were successful
Test / ShareFS (push) Successful in 43s
Test / Hakurei (push) Successful in 53s
Test / Sandbox (push) Successful in 49s
Test / Sandbox (race detector) (push) Successful in 48s
Test / Hakurei (race detector) (push) Successful in 53s
Test / Create distribution (push) Successful in 35s
Test / Flake checks (push) Successful in 1m18s
All checks were successful
Test / ShareFS (push) Successful in 43s
Test / Hakurei (push) Successful in 53s
Test / Sandbox (push) Successful in 49s
Test / Sandbox (race detector) (push) Successful in 48s
Test / Hakurei (race detector) (push) Successful in 53s
Test / Create distribution (push) Successful in 35s
Test / Flake checks (push) Successful in 1m18s
This is useful when limits are configured to allow it. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -100,7 +100,8 @@ func newOutcomeState(k syscallDispatcher, msg message.Msg, id *hst.ID, config *h
|
||||
PrivPID: k.getpid(),
|
||||
Verbose: msg.IsVerbose(),
|
||||
|
||||
SchedPolicy: config.SchedPolicy,
|
||||
SchedPolicy: config.SchedPolicy,
|
||||
SchedPriority: config.SchedPriority,
|
||||
},
|
||||
|
||||
ID: id,
|
||||
|
||||
@@ -75,6 +75,8 @@ type shimParams struct {
|
||||
|
||||
// Copied from [hst.Config].
|
||||
SchedPolicy std.SchedPolicy
|
||||
// Copied from [hst.Config].
|
||||
SchedPriority std.Int
|
||||
|
||||
// Outcome setup ops, contains setup state. Populated by outcome.finalise.
|
||||
Ops []outcomeOp
|
||||
@@ -276,6 +278,7 @@ func shimEntrypoint(k syscallDispatcher) {
|
||||
z := container.New(ctx, msg)
|
||||
z.SetScheduler = state.Shim.SchedPolicy > 0
|
||||
z.SchedPolicy = state.Shim.SchedPolicy
|
||||
z.SchedPriority = state.Shim.SchedPriority
|
||||
z.Params = *stateParams.params
|
||||
z.Stdin, z.Stdout, z.Stderr = os.Stdin, os.Stdout, os.Stderr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user