diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-10-17 12:25:39 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-10-17 12:25:39 +0000 |
commit | a86b81688f7f60bbc4dfe86c2d5b6d815efd6c96 (patch) | |
tree | ddc5bc20ffa47688a773319cf9c6753a6dbc6cb0 /sys | |
parent | 7d20d39c47bd20a1af9ae539837f77984725e8f9 (diff) |
Only the scheduler time statistics should be affected by spinning.
Change the process time accounting back to the original code before
spinning time was added. No change for scheduler time. Spinning
interrupts are no longer accounted to process system time.
input and OK visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_clock.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index b8c4608d238..e773752aee7 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.96 2018/10/10 00:04:54 bluhm Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.97 2018/10/17 12:25:38 bluhm Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -378,19 +378,18 @@ statclock(struct clockframe *frame) * so that we know how much of its real time was spent * in ``non-process'' (i.e., interrupt) work. */ - if (spc->spc_spinning) { - if (p != NULL && p != spc->spc_idleproc) - p->p_sticks++; - spc->spc_cp_time[CP_SPIN]++; - } else if (CLKF_INTR(frame)) { + if (CLKF_INTR(frame)) { if (p != NULL) p->p_iticks++; - spc->spc_cp_time[CP_INTR]++; + spc->spc_cp_time[spc->spc_spinning ? + CP_SPIN : CP_INTR]++; } else if (p != NULL && p != spc->spc_idleproc) { p->p_sticks++; - spc->spc_cp_time[CP_SYS]++; + spc->spc_cp_time[spc->spc_spinning ? + CP_SPIN : CP_SYS]++; } else - spc->spc_cp_time[CP_IDLE]++; + spc->spc_cp_time[spc->spc_spinning ? + CP_SPIN : CP_IDLE]++; } spc->spc_pscnt = psdiv; |