- Bound the interactivity score so that it cannot become negative.
Approved by: re
This commit is contained in:
parent
bc60490a88
commit
e270652ba3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172308
@ -1410,7 +1410,7 @@ sched_priority(struct thread *td)
|
||||
* score. Negative nice values make it easier for a thread to be
|
||||
* considered interactive.
|
||||
*/
|
||||
score = sched_interact_score(td) - td->td_proc->p_nice;
|
||||
score = imax(0, sched_interact_score(td) - td->td_proc->p_nice);
|
||||
if (score < sched_interact) {
|
||||
pri = PRI_MIN_REALTIME;
|
||||
pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME) / sched_interact)
|
||||
|
Loading…
Reference in New Issue
Block a user