mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-06 18:29:47 +00:00
- Use ruxagg() in calcru() to make sure we have current tick information
from all threads. Discussed with: bde, attilio Approved by: re
This commit is contained in:
parent
f48aad41dd
commit
fb62eea266
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171468
@ -840,6 +840,14 @@ calcru(struct proc *p, struct timeval *up, struct timeval *sp)
|
||||
p->p_rux.rux_runtime += u - PCPU_GET(switchtime);
|
||||
PCPU_SET(switchtime, u);
|
||||
}
|
||||
/* Make sure the per-thread stats are current. */
|
||||
FOREACH_THREAD_IN_PROC(p, td) {
|
||||
if (td->td_runtime == 0)
|
||||
continue;
|
||||
thread_lock(td);
|
||||
ruxagg(&p->p_rux, td);
|
||||
thread_unlock(td);
|
||||
}
|
||||
calcru1(p, &p->p_rux, up, sp);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user