Bug 280843

Summary: net/boinc-client: fix idprio to provide the least possible priority
Product: Ports & Packages Reporter: Älven <alster>
Component: Individual Port(s)Assignee: Larry Rosenman <ler>
Status: Closed FIXED    
Severity: Affects Only Me CC: ler
Priority: --- Keywords: performance
Version: LatestFlags: bugzilla: maintainer-feedback? (ler)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
[PATCH] net/boinc-client: fix idprio to provide the least possible priority alster: maintainer-approval? (ler)

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(-)