Bug 254511 - daemon(8): Allow to set daemonized process realtime or idletime scheduling priority
Summary: daemon(8): Allow to set daemonized process realtime or idletime scheduling pr...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: feature
Depends on:
Blocks:
 
Reported: 2021-03-23 18:28 UTC by Yuri Victorovich
Modified: 2023-04-24 13:30 UTC (History)
5 users (show)

See Also:


Attachments
daemon-add-priority.patch (2.78 KB, patch)
2021-03-23 18:28 UTC, Yuri Victorovich
no flags Details | Diff
daemon-add-priority.patch (2.79 KB, patch)
2021-03-24 00:27 UTC, Yuri Victorovich
no flags Details | Diff
daemon-add-priority.patch (2.82 KB, patch)
2021-03-24 00:34 UTC, Yuri Victorovich
no flags Details | Diff
daemon-add-priority.patch (2.82 KB, patch)
2021-03-24 00:38 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2021-03-23 18:28:30 UTC
Created attachment 223530 [details]
daemon-add-priority.patch

The attached patch adds arguments -e {priority}, -i {priority} for realtime and idle priorities respectively.

These arguments can be used when the process should run with an altered priority level.

rtprio(1) generally sets priority process level, but in case of daemon(8) invocation rtprio(1) can't be used as a separate command.

Running 'rtprio {priority} daemon ... commmand ...' would also change daemon(8) process' priority which isn't what is desired.

Running 'daemon ... rtprio {priority} command ...' can't generally work because daemon(8) can change process' user and rtprio(1) would fail.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2021-03-24 00:27:38 UTC
Created attachment 223535 [details]
daemon-add-priority.patch
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2021-03-24 00:34:31 UTC
Created attachment 223536 [details]
daemon-add-priority.patch
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2021-03-24 00:38:52 UTC
Created attachment 223537 [details]
daemon-add-priority.patch
Comment 4 Ihor Antonov 2023-03-06 04:14:28 UTC
I am working on daemon improvements and this feature is planned to be added once transition to kqueue is finished.
Comment 5 Mina Galić freebsd_triage 2023-04-14 20:18:16 UTC
honestly, I think this feature belongs into rc, not into daemon.
Comment 6 Peter Much 2023-04-24 13:30:41 UTC
I agree with Mina Galic. I would prefer having this feature in rc, alongside with another feature to set an arbitrary login-class (which would allow dynamic ressource management via rctl)