diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-26 16:32:35 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-26 16:35:23 +0900 |
| commit | c16725a679c4f47a07c27ab947bcba9e21ecac9b (patch) | |
| tree | a987841a10564f1b68fff9b644f1917c408e9783 | |
| parent | a6160cd410b1def222018cd88951fcbbf1a65f5c (diff) | |
internal/pkg: set container scheduling policy
This is not as necessary as it was for nix, since internal/pkg only unblocks exclusive artifacts one at a time. Still, this is useful when running alongside an unprivileged music player which cannot set itself to a higher priority.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/pkg/exec.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/pkg/exec.go b/internal/pkg/exec.go index 92b14ab7..5c1b399b 100644 --- a/internal/pkg/exec.go +++ b/internal/pkg/exec.go @@ -23,7 +23,7 @@ import ( "hakurei.app/message" ) -// AbsWork is the container pathname [CureContext.GetWorkDir] is mounted on. +// AbsWork is the container pathname [TContext.GetWorkDir] is mounted on. var AbsWork = fhs.AbsRoot.Append("work/") // ExecPath is a slice of [Artifact] and the [check.Absolute] pathname to make @@ -39,6 +39,9 @@ type ExecPath struct { W bool } +// SchedPolicy is the [container] scheduling policy. +var SchedPolicy int + // PromoteLayers returns artifacts with identical-by-content layers promoted to // the highest priority instance, as if mounted via [ExecPath]. func PromoteLayers( @@ -408,6 +411,7 @@ func (a *execArtifact) cure(f *FContext, hostNet bool) (err error) { z.ParentPerm = 0700 z.HostNet = hostNet z.Hostname = "cure" + z.SchedPolicy = SchedPolicy if z.HostNet { z.Hostname = "cure-net" } |
