Return priority range 0..PRI_MAX_TIMESHARE-PRI_MIN_TIMESHARE for
SCHED_OTHER, the same range as rtprio() is using. In old code, it returns nice range -20 .. 20, nice should be treated as process weight, it is really managed by getpriority() and setpriority() syscalls, they are different.
This commit is contained in:
parent
9bbc6c7f54
commit
c3ab507fcd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160285
@ -270,7 +270,7 @@ ksched_get_priority_max(struct ksched *ksched, int policy, int *prio)
|
||||
break;
|
||||
|
||||
case SCHED_OTHER:
|
||||
*prio = PRIO_MAX;
|
||||
*prio = PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -293,7 +293,7 @@ ksched_get_priority_min(struct ksched *ksched, int policy, int *prio)
|
||||
break;
|
||||
|
||||
case SCHED_OTHER:
|
||||
*prio = PRIO_MIN;
|
||||
*prio = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -270,7 +270,7 @@ ksched_get_priority_max(struct ksched *ksched, int policy, int *prio)
|
||||
break;
|
||||
|
||||
case SCHED_OTHER:
|
||||
*prio = PRIO_MAX;
|
||||
*prio = PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -293,7 +293,7 @@ ksched_get_priority_min(struct ksched *ksched, int policy, int *prio)
|
||||
break;
|
||||
|
||||
case SCHED_OTHER:
|
||||
*prio = PRIO_MIN;
|
||||
*prio = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user