mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
- Handle the case where slptime == runtime.
Submitted by: Atoine Brodin
This commit is contained in:
parent
8cfba7267f
commit
52bc574cc7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167669
|
@ -1220,10 +1220,14 @@ sched_interact_score(struct thread *td)
|
|||
div = max(1, td->td_sched->skg_runtime / SCHED_INTERACT_HALF);
|
||||
return (SCHED_INTERACT_HALF +
|
||||
(SCHED_INTERACT_HALF - (td->td_sched->skg_slptime / div)));
|
||||
} if (td->td_sched->skg_slptime > td->td_sched->skg_runtime) {
|
||||
}
|
||||
if (td->td_sched->skg_slptime > td->td_sched->skg_runtime) {
|
||||
div = max(1, td->td_sched->skg_slptime / SCHED_INTERACT_HALF);
|
||||
return (td->td_sched->skg_runtime / div);
|
||||
}
|
||||
/* runtime == slptime */
|
||||
if (td->td_sched->skg_runtime)
|
||||
return (SCHED_INTERACT_HALF);
|
||||
|
||||
/*
|
||||
* This can happen if slptime and runtime are 0.
|
||||
|
|
Loading…
Reference in a new issue