Bug 280843 - net/boinc-client: fix idprio to provide the least possible priority
Summary: net/boinc-client: fix idprio to provide the least possible priority
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Larry Rosenman
URL:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2024-08-16 03:28 UTC by Älven
Modified: 2024-08-21 04:23 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ler)


Attachments
[PATCH] net/boinc-client: fix idprio to provide the least possible priority (1.34 KB, patch)
2024-08-16 03:28 UTC, Älven
alster: maintainer-approval? (ler)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Älven 2024-08-16 03:28:55 UTC
Created attachment 252797 [details]
[PATCH] net/boinc-client: fix idprio to provide the least possible priority

When started with `idprio 31` boinc-client runs with actual PRI=88 NICE=i-86.
When started with `idprio 30` boinc-client runs with actual PRI=186 NICE=i30.

man idprio(1) says:
> Priority is an integer between 0 and RTP_PRIO_MAX (usually 31).

/usr/src/sys/sys/rtprio.h:61 have default value
> #define RTP_PRIO_MAX            31      /* Lowest priority */

Seems like 31 should provide the lowest PRI, but it doesn't!
Something really strange: I've found how to fix it, but can't understand, why does it work this way…
Comment 1 Larry Rosenman freebsd_committer freebsd_triage 2024-08-21 04:23:12 UTC
Committed, thanks.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-08-21 04:23:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0975e9741cae64c3fbbdc6e40291d77f709b5858

commit 0975e9741cae64c3fbbdc6e40291d77f709b5858
Author:     Larry Rosenman <ler@FreeBSD.org>
AuthorDate: 2024-08-21 04:20:54 +0000
Commit:     Larry Rosenman <ler@FreeBSD.org>
CommitDate: 2024-08-21 04:22:45 +0000

    net/boinc-client: fix idprio to provide the least possible priority

    PR:     280843
    Reported by: Älven <alster@vinterdalen.se>

 net/boinc-client/Makefile              | 1 +
 net/boinc-client/files/boinc-client.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)