diff options
author | 2018-10-10 00:04:54 +0000 | |
---|---|---|
committer | 2018-10-10 00:04:54 +0000 | |
commit | 33815e14fd112b99d415269c7f3e1941157b74c3 (patch) | |
tree | dce8e4f52f348d7f763fcb4b8818536958266aa3 | |
parent | Go back to hard-coding 4096 for the bucket size for now. (diff) | |
download | wireguard-openbsd-33815e14fd112b99d415269c7f3e1941157b74c3.tar.xz wireguard-openbsd-33815e14fd112b99d415269c7f3e1941157b74c3.zip |
User land time accounting has changed when kernel spinning time was
introduced. Account spinning time to the process system time again.
time(1) has no spinning, it only shows real, user, sys.
OK visa@ mpi@ deraadt@
-rw-r--r-- | sys/kern/kern_clock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 4c1057d00e3..b8c4608d238 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.95 2018/06/04 18:16:43 cheloha Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.96 2018/10/10 00:04:54 bluhm Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -378,9 +378,11 @@ 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 (spc->spc_spinning) { + if (p != NULL && p != spc->spc_idleproc) + p->p_sticks++; spc->spc_cp_time[CP_SPIN]++; - else if (CLKF_INTR(frame)) { + } else if (CLKF_INTR(frame)) { if (p != NULL) p->p_iticks++; spc->spc_cp_time[CP_INTR]++; |